Why Body cannot be fetched?
Geoff Simmons
geoff at uplex.de
Tue Dec 15 17:29:10 CET 2015
On 12/15/2015 04:57 PM, Gonçalo Silva wrote:
>>
> < HTTP/1.1 200 OK < media-type: application/json;v=1 <
> content-type: application/json; charset=utf-8 < cache-control:
> no-cache < content-length: 698 < trailer: server-authorization <
> transfer-encoding: chunked < accept-ranges: bytes < Date: Tue, 15
> Dec 2015 15:21:52 GMT < Connection: keep-alive < * Connection #0 to
> host 10.10.140.206 left intact
> {"id":"5669b89707955b9996cxxxxx","uuid":"d1921c94-a4a3-4cf1-ade8-16a3041xxxxx","kind":"device","name":"mymanagertest","provider":"teste","resourceUrl":"http://demo-manager.office.mydomain.com/channels","authorizationUrl":"http://demo-manager.office.mydomain.com/authorization","subscriptionUrl":"http://demo-manager.office.mydomain.com/subscriptions","photoUrl":"http://demo-manager.office.mydomain.com/images/profile2.jpg","channelPhotoUrl":"http://mydomain.com/teste.jpg","interface":"baa1766d-d1a2-440b-8ed7-af8296fxxxxx","requiredCapability":"discovery-webview","requiredCapabilityVersion":1,"accessList":[],"auth":{"inbound":{},"outbound":{}},"globalManagerAccess":false,"openOauthInBrowser":false}
>
>
>
> I notice that the response arrives with the header
> "transfer-encoding: chunked", and i'm guessing this might be the
> problem.
The response specifies both Content-Length *and* chunked encoding, but
it has to be one or the other. In fact, the response body is not
chunked-encoded, so it should have been only Content-Length.
> ... how can i use return(pass) for these requests?
For which requests? If you want pass for every URL that begins with
"/profiles/", then:
if (req.url ~ "^/profiles/") {
return(pass);
}
But you really should fix the server, it evidently can't make up its
mind about Content-Length or chunked encoding, and that can't ever be
right.
HTH,
Geoff
--
** * * UPLEX - Nils Goroll Systemoptimierung
Scheffelstraße 32
22301 Hamburg
Tel +49 40 2880 5731
Mob +49 176 636 90917
Fax +49 40 42949753
http://uplex.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20151215/70880293/attachment.pgp>
More information about the varnish-misc
mailing list