You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ben Laurie <be...@gonzo.ben.algroup.co.uk> on 1997/01/06 19:23:34 UTC

Force 1.0 response patch V2

OK, here's the revised 1.0 forcer. As suggested by Alexei, I've made it
specific to 1.0. Also notice that, in keeping with the lowercaseness of
"nokeepalive", I've used "force-response-1.0".

Cheers,

Ben.

Index: http_protocol.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_protocol.c,v
retrieving revision 1.87
diff -c -r1.87 http_protocol.c
*** http_protocol.c	1997/01/01 18:10:21	1.87
--- http_protocol.c	1997/01/06 19:27:11
***************
*** 878,890 ****
  void basic_http_header (request_rec *r)
  {
      BUFF *fd = r->connection->client;
      
      if (r->assbackwards) return;
      
      if (!r->status_line)
          r->status_line = status_lines[index_of_response(r->status)];
      
!     bvputs(fd, SERVER_PROTOCOL, " ", r->status_line, "\015\012", NULL);
      bvputs(fd,"Date: ",gm_timestr_822 (r->pool, r->request_time),
  	   "\015\012", NULL);
      bvputs(fd,"Server: ", SERVER_VERSION, "\015\012", NULL);
--- 878,895 ----
  void basic_http_header (request_rec *r)
  {
      BUFF *fd = r->connection->client;
+     char *t;
      
      if (r->assbackwards) return;
      
      if (!r->status_line)
          r->status_line = status_lines[index_of_response(r->status)];
      
!     if(table_get(r->subprocess_env,"force-response-1.0"))
! 	t="HTTP/1.0";
!     else
! 	t=SERVER_PROTOCOL;
!     bvputs(fd, t, " ", r->status_line, "\015\012", NULL);
      bvputs(fd,"Date: ",gm_timestr_822 (r->pool, r->request_time),
  	   "\015\012", NULL);
      bvputs(fd,"Server: ", SERVER_VERSION, "\015\012", NULL);

-- 
Ben Laurie                Phone: +44 (181) 994 6435  Email: ben@algroup.co.uk
Freelance Consultant and  Fax:   +44 (181) 994 6472
Technical Director        URL: http://www.algroup.co.uk/Apache-SSL
A.L. Digital Ltd,         Apache Group member (http://www.apache.org)
London, England.          Apache-SSL author

Re: Force 1.0 response patch V2

Posted by Rob Hartill <ro...@imdb.com>.
On Mon, 6 Jan 1997, Ben Laurie wrote:

> OK, here's the revised 1.0 forcer. As suggested by Alexei, I've made it
> specific to 1.0. Also notice that, in keeping with the lowercaseness of
> "nokeepalive", I've used "force-response-1.0".

(assuming someone used this on AOL user-agents..)

What happens when a user agent containing AOL comes along belonging to
a 1.1 request with 1.1 stuff it it ?

Won't Apache treat it as 1.1 up until the very last minute then tag the
response with "1.0" and possibly break everything ?