Browse Source

[core] perf: reuse buffer to redirect to directory

personal/stbuehler/fix-fdevent
Glenn Strauss 3 years ago
parent
commit
8ed98ad089
  1. 8
      src/http-header-glue.c

8
src/http-header-glue.c

@ -24,10 +24,7 @@
int http_response_redirect_to_directory(server *srv, connection *con) {
buffer *o;
o = buffer_init();
buffer *o = srv->tmp_buf;
buffer_copy_buffer(o, con->uri.scheme);
buffer_append_string_len(o, CONST_STR_LEN("://"));
if (!buffer_string_is_empty(con->uri.authority)) {
@ -77,9 +74,6 @@ int http_response_redirect_to_directory(server *srv, connection *con) {
con->http_status = 301;
con->file_finished = 1;
buffer_free(o);
return 0;
}

Loading…
Cancel
Save