0
0
mirror of https://github.com/rkd77/elinks.git synced 2025-06-30 22:19:29 -04:00

POST method of CGI did not work. It works now.

[ Backported from commit eef7924ff1ff7508912fe592a7177d214944dfe3
  in ELinks 0.12.GIT.  --KON ]
This commit is contained in:
Witold Filipczyk 2007-03-01 18:35:18 +01:00 committed by Kalle Olavi Niemitalo
parent 8d9837a015
commit a64dd281e9

View File

@ -241,11 +241,18 @@ parse_uri(struct uri *uri, unsigned char *uristring)
} else if (uri->protocol == PROTOCOL_FILE) {
int datalen = check_uri_file(prefix_end);
unsigned char *frag_or_post = prefix_end + datalen;
/* Extract the fragment part. */
if (datalen >= 0 && prefix_end[datalen] == '#') {
uri->fragment = prefix_end + datalen + 1;
uri->fragmentlen = strlen(uri->fragment);
if (datalen >= 0) {
if (*frag_or_post == '#') {
uri->fragment = frag_or_post + 1;
uri->fragmentlen = strcspn(uri->fragment, POST_CHAR_S);
frag_or_post = uri->fragment + uri->fragmentlen;
}
if (*frag_or_post == POST_CHAR) {
uri->post = frag_or_post + 1;
}
} else {
datalen = strlen(prefix_end);
}