+ if (strncmp(inbuf, "GET", 3) == 0) {
+ /* Expecting GET {sp} /URL {sp} HTTP/1.x */
+ for (p = inbuf + 3; *p == ' ' || *p == '\t'; ++p)
+ continue;
+ if (*p) {
+ /* Move past the slash before the URL part. */
+ p++;
+ }
+ /* Splice off the HTTP version identifier. */
+ for (q = p; *q; q++)
+ if (*q == ' ' || *q == '\t')
+ break;
+ if (*q == '\0') {
+ BIO_printf(bio_err, "Invalid request\n");
+ return 1;
+ }
+ *q = '\0';
+ p = urldecode(p);
+ getbio = BIO_new_mem_buf(p, strlen(p));
+ b64 = BIO_new(BIO_f_base64());
+ BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL);
+ getbio = BIO_push(b64, getbio);
+ } else if (strncmp(inbuf, "POST", 4) != 0) {