On Mon, 29 Aug 2016 18:14:28 -0600
Warren Young <w...@etr-usa.com> wrote:

> On Aug 29, 2016, at 5:10 PM, John Found <johnfo...@asm32.info> wrote:
> > 
> > I am running fossil in cgi mode on an experimental web server.
> 
> So your first guess as to the source of the problem is Fossil, not the 
> “experimental” web server?  Hm.  :)
> 
It was in order to determine what of the programs compresses the response. Our 
guess was that it is fossil and I asked in order to be sure.

> > When requesting the main page "/fossil/repo/name/", fossil returns 302 and 
> > redirects to "/fossil/repo/name/index". 
> > The 302 response, contains some message body "Moved" which is ignored by 
> > the browser. 
> 
> This is all perfectly fine.
> 
> > But if the request contains the header "Accept-Encoding: gzip", the 
> > response contains the header "Content-Encoding: gzip" and
> > it seems that fossil compresses the response body.
> 
> That is also as it should be.
> 
> > Is this the case, or the mess happens somewhere else. 
> 
> Your told HTTP that it could accept gzip-encoded data, and Fossil can provide 
> it, so it does, for efficiency.  The CPU time required to gzip data is 
> generally much lower than the increased network I/O time it takes to send the 
> uncompressed version of the data, so it’s faster overall.
> 
> > IMHO, the cgi script should not return "Content-Encoding” header
> 
> Of course it should.  Only the data source knows what content encoding it 
> used. fcgiwrap and your “experimental” web server should just pass that 
> header along, since they’re acting as proxies in this transaction.
> 
> > this is the function of the web server.
> 
> Only in the case of static content.
> 
The CGI should not mess with the communication between the client and the 
server. 
It is specified in the mentioned RFC3875:

   The script MUST NOT return any header fields that relate to
   client-side communication issues and could affect the server's
   ability to send the response to the client.  The server MAY remove
   any such header fields returned by the client.  It SHOULD resolve any
   conflicts between header fields returned by the script and header
   fields that it would otherwise send itself.

The compression falls exactly in the term "client-server communication" - the 
client specifies what compression it can accept and the server decide whether 
to provide it, or not. 

> > And this hangs, waiting for the body: 
> >  $curl -L -v -v -v --header 'Accept-Encoding: gzip' 
> > http://fresh.flatassembler.net/fossil/repo/fresh
> 
> It doesn’t hang when you connect to Fossil’s own internal HTTP server.  
> Therefore, the problem is either in fcgiwrap or your “experimental” web 
> server.

It is fixed now and nothing hangs anymore.

-- 
http://fresh.flatassembler.net
http://asm32.info
John Found <johnfo...@asm32.info>
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to