1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

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

This commit is contained in:
Witold Filipczyk 2007-03-01 18:35:18 +01:00 committed by Kalle Olavi Niemitalo
parent 4c636d74f1
commit eef7924ff1
2 changed files with 11 additions and 4 deletions

View File

@ -384,7 +384,7 @@ execute_cgi(struct connection *conn)
/* Use data socket for passing the pipe. It will be cleaned up in
* close_pipe_and_read(). */
conn->data_socket->fd = pipe_read[1];
conn->data_socket->fd = pipe_write[1];
set_nonblocking_fd(conn->socket->fd);
set_nonblocking_fd(conn->data_socket->fd);

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);
}