summaryrefslogtreecommitdiff
path: root/src/reqs.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2003-05-31# Changed all the for calls to use the != test rather than < test.Robert James Kaes1-5/+5
The change was recommended in the C/C++ User Journal magazine.
2003-05-30# Changed the calls to vector_getentry() to use the new callingRobert James Kaes1-2/+3
convention.
2003-05-29# Renamed the vector_insert() calls to vector_append()Robert James Kaes1-2/+2
2003-05-29Improved the upstream proxy support by making the upstream proxyRobert James Kaes1-16/+153
server configurable based on the destination host. [Code written by Peter da Silva]
2003-05-05(establish_http_connection): If the port being requested is not aRobert James Kaes1-7/+23
standard HTTP port (80 or 443) append the port string to the host header; otherwise, leave the host string with only the host's domain name. Replaced all occurrences of constant 80 and 443 with defines HTTP_PORT and HTTP_PORT_SSL.
2003-04-16(build_url): Rebuild the URL from the component pieces. This functionRobert James Kaes1-13/+53
is used by the transparent proxy code. [Anatole Shaw] (process_request): Fixed up the transparent proxy code so that filtering can be done on the whole URL. [Anatole Shaw] (pull_client_data): Added a bug fix for Internet Explorer (IE). IE will leave an extra CR and LF after the data in an HTTP POST. The new code will eat the extra bytes if they're present. Thanks to Yannick Koehler for finding the bug and offering an explanation as to why it was happening. Changed all calls of connptr->remote_content_length to connptr->content_length.server
2003-03-26(establish_http_connection): Always include the port number for theRobert James Kaes1-3/+4
requested server. This fixes a problem when the server is not listening on the default port, 80. [Fix suggested by duncan@sapio.co.uk]
2003-03-14# Updated all the calls to indicate_http_error() to include aRobert James Kaes1-18/+35
terminating NULL. The va_arg() function requires it to work properly.
2003-03-13# Changed calls to indicate_http_error() to use the new HTML variableRobert James Kaes1-34/+53
substitution mechanism. [Steven Young]
2003-01-28# (connect_to_upstream): Improved the preprocessor directives to makeRobert James Kaes1-3/+3
sure the function would compile cleanly regardless of how the directive was set.
2003-01-27(connect_to_upstream): Reorganized the preprocessor directives to makeRobert James Kaes1-3/+9
sure the function's symbol name is stored, even if upstream was not compiled it. This should keep some compilers from reporting errors.
2003-01-27(process_client_headers): Fixed inverted anonymous header logic. FixRobert James Kaes1-2/+2
comes from the FreeBSD port through James E. Flemer.
2002-12-04(strip_username_password): New function to remove anyRobert James Kaes1-1/+27
username/password part from the host URI. (extract_http_url), (extract_ssl_url): Use the new strip_username_password function to remove any non-host information from the URI.
2002-12-04Removed the "bool_t" type since it conflicts with the newer C standards.Robert James Kaes1-2/+2
The type was just replaced by "unsigned int" types.
2002-11-29(extract_http_url): Removed the leading "http://" from all the tests,Robert James Kaes1-11/+12
since it's skipped by the caller before the URL is passed to this function. (process_request): Include code to handle proxy FTP requests as well. This also lead to a bit of a cleanup in the calling conventions of extract_http_url function. tinyproxy can handle both types of resources by skipping the leading :// part.
2002-11-26Included code to disable the sending of the Via header. This is nowRobert James Kaes1-13/+18
controlled by the ViaHeader configure directive.
2002-11-13(relay_connection): Shutdown the client socket for writing once allRobert James Kaes1-1/+2
the data has been sent.
2002-11-03Removed all the code supporting the TCP tunnelling feature ofRobert James Kaes1-81/+1
tinyproxy. There is really no need for this code, since there are perfectly good programs out there (like rinetd) which are designed for TCP tunnelling. tinyproxy should be a good HTTP proxy, nothing more, and nothing less; therefore, the tunnelling code is gone.
2002-10-17(relay_connection): Ivan pointed out a bug with the code to send anyRobert James Kaes1-2/+2
remaining data to the server when the connections are being closed. It was a one line fix.
2002-06-06A bunch of changes from Petr Lampa that add transparent proxy support to ↵Robert James Kaes1-27/+98
tinyproxy. The additional code is in process_request(), but Petr also had to change around some of the other functions (like process_client_headers and handle_connection.) Note: Right now this code has not been tested, but it is believed to work. To enable run ./configure --enable-transparent-proxy
2002-05-31(process_server_headers): Since we're stripping off the carriage return and ↵Robert James Kaes1-2/+2
newline, we need to add them back on when sending the response header to the client.
2002-05-29(add_header_to_connection): Removed the "double_cgi" boolean, since ↵Robert James Kaes1-12/+5
tinyproxy now ignores all the headers after a "double CGI" situation has occurred. (get_all_headers): Instead of dropping duplicate headers when the "double CGI" situation occurs, tinyproxy will now drop _all_ the headers from the "inner" HTTP response.
2002-05-28(add_header_to_connection): Added a boolean to indicate that a "Double CGI" ↵Robert James Kaes1-6/+22
situation is in affect. This is needed to solve a problem with some sites (like cgi.ebay.com) where they are sending two HTTP response lines (and associated headers) with a response. (get_all_headers): Detect if a "Double CGI" situation has occured.
2002-05-28(get_all_headers): Added code to ignore a "response" line in a header. This ↵Robert James Kaes1-2/+31
was pointed out as being a problem with eBay (cgi.ebay.com) (process_server_headers): Added code to make skip blank lines before a response line.
2002-05-27(process_request): Changed the filtering code around to handle both domains ↵Robert James Kaes1-10/+21
and URLs.
2002-05-26Spelling changes (from thread to child.)Robert James Kaes1-2/+2
2002-05-24Fixed a tonne of spelling mistakes.Robert James Kaes1-5/+5
2002-05-23Fixed up a spelling mistake and changed various bits of code to takeRobert James Kaes1-9/+10
advantage of the fact that the peer's socket information is now stored inside the connection structure.
2002-05-17request->host might have been freed by the time we get toRobert James Kaes1-7/+3
free_request_struct(), so make sure it's pointing to memory.
2002-05-14Moved the definition of the struct buffer_s into the buffer.c file and outRobert James Kaes1-7/+7
of the buffer.h file. This also required the removal of the BUFFER_SIZE macro, and replace it with the buffer_size() function.
2002-05-08Removed the request logging in the tunnel because it breaks the tunnelRobert James Kaes1-1/+16
concept since it blocks waiting for information from the client before any data from the remote is relayed.
2002-04-28Added more error checking in process_client_headers() andRobert James Kaes1-34/+68
process_server_headers() functions. Also, better reporting of errors back to the client.
2002-04-26Changed the len type to ssize_t because we need to detect errors in theRobert James Kaes1-2/+2
recv() call. Thanks to Tom Cross for discovering this bug.
2002-04-26Need to check the return value of hashmap_first() since it could beRobert James Kaes1-24/+26
negative.
2002-04-25Check to see if request->path is actually allocated before trying to freeRobert James Kaes1-2/+8
it.
2002-04-25First change all the hashmap related calls to use the new API.Robert James Kaes1-47/+57
The remove_connection_headers() function now handles both the Connection header _and_ the Proxy-Connection header.
2002-04-24Fixed a couple of problems where tinyproxy was trying to free a memoryRobert James Kaes1-4/+7
block which had not been allocated. Also, the "proxy-connection" to the list of headers we don't pass.
2002-04-22Added the "Proxy-Connection" header to the list of client headers whichRobert James Kaes1-1/+2
are not passed along.
2002-04-18The stats now wait until after the client has finished sending all itsRobert James Kaes1-7/+11
headers before sending the HTTP response back. This should be more standards compliant.
2002-04-18Fixed a memory leak in reading in headers from the client or server.Robert James Kaes1-4/+12
2002-04-17If the initialize_conn() function fails, close the socket and return.Robert James Kaes1-3/+5
Also, changed the call to check_acl() to include the peer's IP and string addresses.
2002-04-16Various code clean up. There is nothing new here, just mechanical changesRobert James Kaes1-67/+43
to the source to either remove code which is not needed, or consolidate common code into a common section.
2002-04-15Changed the variable type in read_request_line() to an unsigned variableRobert James Kaes1-2/+2
in order to detect negative returns.
2002-04-15Changed the error boolean flag into a pointer to an error string and anRobert James Kaes1-16/+17
error code. We're storing this information because tinyproxy doesn't output the error information until _after_ the client has sent it's information.
2002-04-12Added code to support the new ConnectPort directive which is needed toRobert James Kaes1-1/+72
improve security of the tinyproxy system. This new directive allows the admin to block CONNECT methods to illegal ports.
2002-04-12Added a write_via_header() function which is now used in both headerRobert James Kaes1-40/+67
processing functions. Also, added a list of headers to drop in the process server header functions.
2002-04-11Did a bit of consolidation by moving code into remove_connection_headers()Robert James Kaes1-37/+106
and added the get_content_length() function. The process_server_headers() function was rewritten to remove the Connection header correctly, and also retrieve the Content-Length value. This value is needed in the relay_connection() function since there are some remote machines which do not properly close down the connection once the body has been retrieved. Thanks to James Flemer for finding a test case for this problem.
2002-04-09Removed the compare_header() function since it's been replaced by a callRobert James Kaes1-15/+7
the anonymous_search(). Added a few more log_message() calls to better explain error conditions. Fixed up a problem with X-Tinyproxy sending logic.
2002-04-07A _tonne_ of changes. It would almost be easier to just read the sourceRobert James Kaes1-163/+228
itself to find out all the changes. Changed the process_client_header() function to use the hashmap and vector modules. I've made this change to better handle the Connection header. The Connection header, it it's present, lists all the headers which should _not_ be transmitted any further along. An HTTP/1.1 proxy must respect this. Other changes are basically cosmetic.
2001-12-24Moved write_message() into sock.c because I'm using it in other places.Robert James Kaes1-53/+1