summaryrefslogtreecommitdiffhomepage
path: root/src/reqs.c
AgeCommit message (Collapse)Author
2002-04-24Fixed a couple of problems where tinyproxy was trying to free a memoryRobert James Kaes
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 Kaes
are not passed along.
2002-04-18The stats now wait until after the client has finished sending all itsRobert James Kaes
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 Kaes
2002-04-17If the initialize_conn() function fails, close the socket and return.Robert James Kaes
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 Kaes
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 Kaes
in order to detect negative returns.
2002-04-15Changed the error boolean flag into a pointer to an error string and anRobert James Kaes
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 Kaes
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 Kaes
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 Kaes
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 Kaes
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 Kaes
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 Kaes
2001-12-23Cleaned up the code which sends the "Via" header. It now usesRobert James Kaes
write_message().
2001-12-20Created the CHECK_CRLF() macro to handle the tests for the appropriateRobert James Kaes
control characters in a string.
2001-12-19Removed duplicate code from process_server_headers() and removed the callsRobert James Kaes
to strlen(); readline() already returns the length of the string, so use that instead.
2001-12-19Damn---removed the debugging code from write_message().Robert James Kaes
2001-12-19Opps! Fixed a problem with negative numbers. :)Robert James Kaes
2001-12-19Redefined HTTP_LINE_LENGTH to be based on MAXBUFFSIZE (and set to aroundRobert James Kaes
16 KB.) Added the TUNNEL_CONFIGURED() macro to help with testing for the tunnel support code. Create the write_message() function to encapsulate the code which sends the information to the file descriptor. Moved the tunnel code into it's own function.
2001-12-18Updated the list of headers to ignore.Robert James Kaes
2001-12-17Added the code to log the request when in tunnelling mode.Robert James Kaes
2001-12-17Added UPSTREAM_CONFIGURED() macro to help clean up the code.Robert James Kaes
Ignore any blank lines when tinyproxy is expecting a request line. Instead of sending the request line to the remote server in pieces, tinyproxy nows sends it in once go. This was done to fix a problem with some sites like www.heise.de. Changed all calls to connptr->ssl to connptr->connect_method. Changed all calls to connptr->send_message to connptr->send_response_message. Moved the call to Via header code to inside to the tests to handle if tinyproxy is sending an error message (don't need to send any headers.)
2001-11-23Removed the trim() function and move it into chomp()/utils.cRobert James Kaes
2001-11-22Reformated text.Robert James Kaes
2001-11-22Replaced the calls to the old readline() function with calls to the newRobert James Kaes
version.
2001-11-21#if 0'd the code handling the "Via" header in the process_client_headers()Robert James Kaes
function since I'm not completely happy with the code.
2001-11-21Extract the version from the request line and store it in the conn_sRobert James Kaes
structure. Don't send a Connection header to the remote connection. Handle the Via header correctly.
2001-11-05Replaced all calls to buffer_size() with the macro BUFFER_SIZE().Robert James Kaes
2001-11-02Informing the user of the connection to the tunnel is a INFO type message,Robert James Kaes
not a CONN level message.
2001-10-25Some code clean up due to the creation of the conns.{c,h} files which nowRobert James Kaes
store the creation/destruction and definition of the connection structure.
2001-10-25Fixed the problems with sending/not sending headers so that the CONNECTRobert James Kaes
(SSL) method would work with upstream proxying!
2001-10-25Changed the way relay_connection() works by having the both buffersRobert James Kaes
emptied when either socket is closed. This should be better for the tunnel connections. Change the connect_to_upstream() function to better utilize the establish_http_connection() function. Code re-use is cool. :)
2001-10-24Error message cleanup to make the information more informative.Robert James Kaes
2001-10-22Cleaned up the code in handle_connection() and added a NULL pointer testRobert James Kaes
in the free request function.
2001-10-19More moving around of the source code. Still can't get CONNECT to workRobert James Kaes
with an upstream proxy.
2001-10-17Trying to allow CONNECT methods through an Upstream proxy.Robert James Kaes
2001-09-16Moved the safe_read() and safe_write() functions into the sock.c fileRobert James Kaes
since they're now used in other places. Added support for a true upstream proxy connection. This involved some rewriting of the handle_connection() function and some of the support functions so that they do perform the domain filtering and anonymous filtering while still connecting to the upstream proxy. I think the code should be cleaned up further.
2001-09-15Removed the log messages related to memory allocation.Robert James Kaes
Move the SSL response header into into own function. Added support for the status host.
2001-09-14Finally got the SSL problem fixed. We can not send _any_ client headersRobert James Kaes
(including the new line) to the origin server when in tunnelling mode. SSL now works correctly. Yeah.
2001-09-14Changed the buffer pointer in safe_write() to be const void* since we'reRobert James Kaes
not changing the values. Instead of building a new request and memory, simply send each part separately. Actually uses less memory _and_ less code.
2001-09-14Massive changes. Split process_method() into a bunch of smaller files andRobert James Kaes
changed the parsing code from REGEX and uri.c to a simplier sscanf() method. Also, include code to handle SSL connections, but that's not quite working yet.
2001-09-12Fixed memory leak.Robert James Kaes
2001-09-11Switched the memory allocation for the large strings to heap based insteadRobert James Kaes
of stack based.
2001-09-08Changed all the mallocs and callocs to use the new safemalloc andRobert James Kaes
safecalloc.
2001-09-07Error message cleanup.Robert James Kaes
2001-09-04Moved the compare_header() test after the skip header test.Robert James Kaes
2001-08-30Replaced the call to xstrstr() with strstr().Robert James Kaes
2001-08-28Moved the strip new line/carriage return from the end of a line into aRobert James Kaes
separate function.
2001-08-27Fixed a SEGV problem with invalid requests.Robert James Kaes