Thanks for the replies! (Just got back to the office to test.) Adding the
extra (lambda ()) seems to do the trick.

By the way, I simplified my code too much, there was already a no-template:
#t, so that wasn't the problem.

And indeed the extra headers weren't always there, but it wasn't as simple
as only first or not-first requests.

Nathaniel





On Fri, Mar 27, 2015 at 1:37 PM, Andy Bennett <[email protected]>
wrote:

> Is this thing on?
> I seem to be having trouble posting this.
>
>
> -------- Forwarded Message --------
> Subject: Re: [Chicken-users] headers with nginx + awful
> Date: Tue, 24 Mar 2015 22:13:11 +0000
> From: Andy Bennett <[email protected]>
> To: Nathaniel Rudavsky-Brody <[email protected]>
>
> Hi,
>
> Given that it's happening with Firefox but not with Curl, I'd look into
> the connection reuse between nginx and spiffy.
>
> Curl always opens a new http connection: Firefox might reuse one that it
> has around already.
>
> Does this happen only on not-the-first-request?
>
>
> Sorry to top post.
>
> > I'm having a problem with headers when using nginx's proxy_pass with
> > awful, and I'm not sure if it's a question of nginx or Chicken, or just
> > my misunderstanding of headers...
> >
> > Everything works fine except when I use (send-static-file) as in:
> >
> > (define-page (regexp "/file/.+")
> >   (lambda (url)
> >       (parameterize ((root-path (data-dir)))
> >           (send-static-file (string-drop url 6)))))
> >
> > In this case, Firefox shows me a set of Spiffy headers at the end of the
> > response body, even though they should be replaced by nginx's headers,
> > which seem to be fine:
> >
> > <html>
> >   ...
> > </html>
> > HTTP/1.1 200 OK
> > Content-Type: text/html
> > Server: Spiffy/5.3 (Running on Chicken 4.8.0.6)
> > Content-Length: 6
> > Date: Tue, 24 Mar 2015 16:01:46 GMT
> >
> > 483702
> >
> > Curl, however, only sees the nginx headers, with nothing extra at the
> end:
> >
> > HTTP/1.1 200 OK
> > Server: nginx/1.4.6 (Ubuntu)
> > Date: Tue, 24 Mar 2015 16:24:42 GMT
> > Content-Type: text/html
> > Content-Length: 483704
> > Connection: keep-alive
> > Last-Modified: Tue, 24 Mar 2015 16:23:40 GMT
> > Etag: "483704-1427214220.0"
> >
> > <html>
> >   ...
> > </html>
> >
> > My nginx config is just:
> >
> >     server {
> >           listen        7000;
> >           location / {
> >                    proxy_pass http://localhost:8080;
> >
> >           }
> >         }
> >
> > Many thanks for any ideas.
> >
> > Nathaniel
> >
> >
> >
> >
> >
> > _______________________________________________
> > Chicken-users mailing list
> > [email protected]
> > https://lists.nongnu.org/mailman/listinfo/chicken-users
> >
>
>
>
>
>
> Regards,
> @ndy
>
> --
> [email protected]
> http://www.ashurst.eu.org/
> 0290 DA75 E982 7D99 A51F  E46A 387A 7695 7EBA 75FF
>
>
>
>
>
> Regards,
> @ndy
>
> --
> [email protected]
> http://www.ashurst.eu.org/
> 0290 DA75 E982 7D99 A51F  E46A 387A 7695 7EBA 75FF
>
>
>
>
> _______________________________________________
> Chicken-users mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/chicken-users
>



-- 


Caractères mobiles
Livre numérique, papier et web
http://studio.cm
Tél +32 (0) 2 213 86 45
Gsm +32 (0) 485 136 458
_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to