Browse Source

[mod_proxy] remove use of con->got_response

personal/stbuehler/mod-csrf
Glenn Strauss 5 years ago
parent
commit
76ad82434f
  1. 3
      src/base.h
  2. 1
      src/connections-glue.c
  3. 1
      src/connections.c
  4. 8
      src/mod_proxy.c

3
src/base.h

@ -410,9 +410,6 @@ typedef struct connection {
array *environment; /* used to pass lighttpd internal stuff to the FastCGI/CGI apps, setenv does that */
/* response */
int got_response;
connection_type mode;
void **plugin_ctx; /* plugin connection specific config */

1
src/connections-glue.c

@ -466,7 +466,6 @@ void connection_response_reset(server *srv, connection *con) {
con->is_writable = 1;
con->file_finished = 0;
con->file_started = 0;
con->got_response = 0;
con->parsed_response = 0;
con->response.keep_alive = 0;
con->response.content_length = -1;

1
src/connections.c

@ -1214,7 +1214,6 @@ int connection_state_machine(server *srv, connection *con) {
con->is_writable = 1;
con->file_finished = 0;
con->file_started = 0;
con->got_response = 0;
con->parsed_response = 0;
con->response.keep_alive = 0;
con->response.content_length = -1;

8
src/mod_proxy.c

@ -899,11 +899,6 @@ static int proxy_demux_response(server *srv, handler_ctx *hctx) {
"demux: Response buffer len", hctx->response->used, ":", hctx->response, ":");
#endif
if (0 == con->got_response) {
con->got_response = 1;
buffer_string_prepare_copy(hctx->response_header, 1023);
}
if (0 == con->file_started) {
char *c;
@ -913,6 +908,9 @@ static int proxy_demux_response(server *srv, handler_ctx *hctx) {
size_t blen = buffer_string_length(hctx->response) - hlen;
/* found */
if (buffer_is_empty(hctx->response_header)) {
buffer_string_prepare_copy(hctx->response_header, 1023);
}
buffer_append_string_len(hctx->response_header, hctx->response->ptr, hlen);
#if 0
log_error_write(srv, __FILE__, __LINE__, "sb", "Header:", hctx->response_header);

Loading…
Cancel
Save