<div dir="ltr">Hello,<br><br>I'm having problems getting varnish processing this kind of requests.<br>If i do the request direct to the backend i have no problem and this is the result:<br><br>------<br>root@Reverse:~# curl --raw -v -X "GET" -H 'Authorization: Hawk id="xxxx", ts="xxxxx", nonce="xxxxx", mac="akA+pAge015LbAq+fq3YPG9PM0EgSl3/xxxxxx="' -H 'Host: <a href="http://myhostbackend.com">myhostbackend.com</a>'  <a href="http://myhostbackend.com:4050/profiles/89a12688-8653-4f76-bb18-xxxxx">http://myhostbackend.com:4050/profiles/89a12688-8653-4f76-bb18-xxxxx</a><br>* Hostname was NOT found in DNS cache<br>*   Trying myhostbackend.com...<br>* Connected to <a href="http://myhostbackend.com">myhostbackend.com</a> (xx.xx.xx.xx) port 4050 (#0)<br>> GET /profiles/89a12688-8653-4f76-bb18-xxxxxxx HTTP/1.1<br>> User-Agent: curl/7.35.0<br>> Accept: */*<br>> Authorization: Hawk id="xxxx", ts="xxxxx", nonce="xxxxx", mac="akA+pAge015LbAq+fq3YPG9PM0EgSl3/xxxxxx="<br>> Host: <a href="http://myhostbackend.com">myhostbackend.com</a><br>><br>< HTTP/1.1 200 OK<br>< media-type: application/json;v=v0<br>< content-type: application/json; charset=utf-8<br>< cache-control: no-cache<br>< trailer: server-authorization<br>< transfer-encoding: chunked<br>< Date: Tue, 05 Jan 2016 17:17:07 GMT<br>< Connection: keep-alive<br><<br>228<br>{"id":"xxxxxxxx","uuid":"89a12688-8653-xxxxxxx-xxxx","kind":"device","name":"apagar","provider":"apagarrr","resourceUrl":"<a href="http://xxx.com/channels">http://xxx.com/channels</a>","authorizationUrl":"<a href="http://xxx.com/authorization">http://xxx.com/authorization</a>","subscriptionUrl":"<a href="http://xxx.com/subscriptions">http://xxx.com/subscriptions</a>","photoUrl":"<a href="http://xxx.com/images/profile.jpg">http://xxx.com/images/profile.jpg</a>","requiredCapabilityVersion":1,"accessList":[],"auth":{"inbound":{},"outbound":{}},"globalManagerAccess":false,"openOauthInBrowser":false}<br>0<br>server-authorization: Hawk mac="RuMz8Rm1DAq3Uuq1HSz/IjCidjn/R73+LnX6pntIKX4=", hash="vrcvy0YWrI4CO5qMmGP6GLgGy3VexSFvjXdJGeYzBOQ="<br><br>* Connection #0 to host xxx.xxx.xxx.xxx left intact<br><br>-----<br><br>if i do the request via varnish, i'm not getting all the response, and don't how why but the http header "trailer: server-authorization" doesn't shows up. I can see "FetchError chunked tail no NL" on the varnish log, but not sure what it means in this situation. <br> <br>---- <br>root@Reverse:~# curl --raw -v -X "GET" -H 'Authorization: Hawk id="xxxx", ts="xxxxx", nonce="xxxxx", mac="akA+pAge015LbAq+fq3YPG9PM0EgSl3/xxxxxx="' -H 'Host: <a href="http://myhostbackend.com">myhostbackend.com</a>'   <a href="http://127.0.0.1:6081/profiles/89a12688-8653-4f76-bb18-xxxxx">http://127.0.0.1:6081/profiles/89a12688-8653-4f76-bb18-xxxxx</a><br>* Hostname was NOT found in DNS cache<br>*   Trying 127.0.0.1...<br>* Connected to 127.0.0.1 (127.0.0.1) port 6081 (#0)<br>> GET /profiles/89a12688-8653-4f76-bb18-xxxxxxx HTTP/1.1<br>> User-Agent: curl/7.35.0<br>> Accept: */*<br>> Authorization: Hawk id="xxxx", ts="xxxxx", nonce="xxxxx", mac="akA+pAge015LbAq+fq3YPG9PM0EgSl3/xxxxxx="<br>> Host: <a href="http://myhostbackend.com">myhostbackend.com</a><br><br> HTTP/1.1 200 OK<br>< media-type: application/json;v=v0<br>< content-type: application/json; charset=utf-8<br>< cache-control: no-cache<br>< Date: Tue, 05 Jan 2016 17:14:54 GMT<br>< X-Varnish: 32773<br>< Age: 0<br>< Via: 1.1 varnish-v4<br>< Accept-Ranges: bytes<br>< Transfer-Encoding: chunked<br>< Connection: keep-alive<br><br><<br>00228<br>{"id":"xxxxxxxx","uuid":"89a12688-8653-xxxxxxx-xxxx","kind":"device","name":"apagar","provider":"apagarrr","resourceUrl":"<a href="http://xxx.com/channels">http://xxx.com/channels</a>","authorizationUrl":"<a href="http://xxx.com/authorization">http://xxx.com/authorization</a>","subscriptionUrl":"<a href="http://xxx.com/subscriptions">http://xxx.com/subscriptions</a>","photoUrl":"<a href="http://xxx.com/images/profile.jpg">http://xxx.com/images/profile.jpg</a>","requiredCapabilityVersion":1,"accessList":[],"auth":{"inbound":{},"outbound":{}},"globalManagerAccess":false,"openOauthInBrowser":false}<br>* transfer closed with outstanding read data remaining<br>* Closing connection 0<br>--------<br><br>The log from varnish is:<br><br>*   << BeReq    >> 32774<br>-   Begin          bereq 32773 pass<br>-   Timestamp      Start: 1452014094.207771 0.000000 0.000000<br>-   BereqMethod    GET<br>-   BereqURL       /profiles/89a12688-8653-4f76-bb18-3bfe2b829400<br>-   BereqProtocol  HTTP/1.1<br>-   BereqHeader    User-Agent: curl/7.35.0<br>-   BereqHeader    Accept: */*<br>-   BereqHeader    Authorization: Hawk idAuthorization: Hawk id="xxxx", ts="xxxxx", nonce="xxxxx", mac="akA+pAge015LbAq+fq3YPG9PM0EgSl3/xxxxxx="<br>-   BereqHeader    Host: <a href="http://myhostbackend.com">myhostbackend.com</a><br>-   BereqHeader    X-Forwarded-For: 127.0.0.1<br>-   BereqHeader    X-Varnish: 32774<br>-   VCL_call       BACKEND_FETCH<br>-   VCL_return     fetch<br>-   BackendOpen    18 boot.apiserver xxx.xxx.xxx.xxx 4050 xxx.xxx.xxx.xxx 34845<br>-   Timestamp      Bereq: 1452014094.208532 0.000761 0.000761<br>-   Timestamp      Beresp: 1452014094.220400 0.012629 0.011868<br>-   BerespProtocol HTTP/1.1<br>-   BerespStatus   200<br>-   BerespReason   OK<br>-   BerespHeader   media-type: application/json;v=v0<br>-   BerespHeader   content-type: application/json; charset=utf-8<br>-   BerespHeader   cache-control: no-cache<br>-   BerespHeader   trailer: server-authorization<br>-   BerespHeader   transfer-encoding: chunked<br>-   BerespHeader   Date: Tue, 05 Jan 2016 17:14:54 GMT<br>-   BerespHeader   Connection: keep-alive<br>-   TTL            RFC 120 10 -1 1452014094 1452014094 1452014094 0 0<br>-   VCL_call       BACKEND_RESPONSE<br>-   TTL            VCL 120 10 0 1452014094<br>-   VCL_return     deliver<br>-   Storage        malloc Transient<br>-   ObjProtocol    HTTP/1.1<br>-   ObjStatus      200<br>-   ObjReason      OK<br>-   ObjHeader      media-type: application/json;v=v0<br>-   ObjHeader      content-type: application/json; charset=utf-8<br>-   ObjHeader      cache-control: no-cache<br>-   ObjHeader      Date: Tue, 05 Jan 2016 17:14:54 GMT<br>-   Fetch_Body     2 chunked stream<br>-   FetchError     chunked tail no NL<br>-   BackendClose   18 boot.apiserver<br>-   BereqAcct      310 0 310 246 552 798<br>-   End<br><br><br>If i put the varnish configuration using pipe for this requests, everything works, but of course i can't cache them.<br>Can anyone understands what is going on here and if this is a configuration problem or something more deeper?<br><br>Thanks<br><br></div>