esteban it would be really great if you could extract from your experience a kind of blog, book chapter whatever to share it with other developers around the world. Stef On Dec 13, 2013, at 1:36 AM, Esteban A. Maringolo <emaringolo@gmail.com> wrote:
I'm having issues with a connection coming from an Android app connecting both trough an nginx proxy, but also using some REST testing tools:
nginx error log: 2013/12/12 23:23:17 [error] 701#0: *49 upstream prematurely closed connection while reading response header from upstream, client: XX.XX.XX.XX, server: app01.mydomain.com, request: "POST /app-api/v1/auth/login HTTP/1.1", upstream: "http://127.0.0.1:8080/app-api/v1/auth/login", host: "app01.mydomain.com:80" (END)
ZnZincSeasideAdapter log: 2013-12-12 23:23:17 897330 D Executing request/response loop 2013-12-12 23:23:17 897330 I Read a ZnRequest(POST /app-api/v1/auth/login) 2013-12-12 23:23:17 897330 T POST /app-api/v1/auth/login 200 114B 42ms 2013-12-12 23:23:17 897330 D ConnectionClosed: Cannot write data while writing response 2013-12-12 23:23:17 897330 D Closing stream
I'm using Basic HTTP Auth in each request.
But what's weird is that with curl it works perfectly fine.
Again, I think this is not strictly Zinc related, but it doesn't work connecting directly to the Zinc server either:
2013-12-13 00:17:02 939035 D Executing request/response loop 2013-12-13 00:17:02 939035 I Read a ZnRequest(POST /app-api/v1/auth/login) 2013-12-13 00:17:02 939035 T POST /app-api/v1/auth/login 200 114B 12ms 2013-12-13 00:17:02 939035 D ConnectionClosed: Cannot write data while writing response 2013-12-13 00:17:02 939035 D Closing stream
I don't know if this has to do with the wireless provider doing some proxying behind the wall (which they do), but given the fact that if I try using some REST testing tools from my computer and they also fail, I think it has to do with something else.
At nginx I'm forwarding the Authorization header to the Zinc Server:
proxy_set_header Authorization $http_authorization; proxy_pass_header Authorization;
Is there a way I can log the complete request headers at the Zinc side, and if possible also at nginx?
Regards,
Esteban A. Maringolo