Re: Java Ring Handler Derived Content-Type Override

12 views
Skip to first unread message

Yuexiang Zhang

unread,
Jun 25, 2017, 10:21:10 PM6/25/17
to Giancarlo Durastanti, Nginx-Clojure
Please try default_type whose doc url is http://nginx.org/en/docs/http/ngx_http_core_module.html#default_type  . I think it's enough.

BTW if you use content handler a headers map can also be returned, e.g.


return new Object[]  {
                                200,
        ArrayMap.create("content-type", "text/html"),
                                body}


On Fri, Jun 23, 2017 at 4:55 AM, Giancarlo Durastanti <gdura...@gmail.com> wrote:
Hello,

I'm currently implementing a java proxy for a project and am having an issue regarding the forwarding of a WCF request. 

WCF seems to be rejecting my request because somewhere in the Nginx stack it is adding a content-type header of application/octet-stream. 

Notice the first occurrence in this snippet below:

HTTP/1.1 200 OK
Date: Thu, 22 Jun 2017 20:10:59 GMT
Content-Type: application/octet-stream
Content-Length: 416
Connection: keep-alive
Content-Type: application/soap+xml; charset=utf-8: Server: Microsoft-IIS/7.0
X
-Powered-By: ASP.NET: Date: Thu, 22 Jun 2017 20:10:59 GMT
Server: nginx-clojure/0.4.5


Is there any way to prevent Nginx from adding that header key to the response I am returning back from my Ring Handler? 

Can I pass another argument into the object array to disable/override this behavior? 

Am I interpreting this incorrectly? I also noticed the server tags seem to be duplicated. Do I need to pass configuration to nginx to prevent the manipulation of the response header all together?

--
You received this message because you are subscribed to the Google Groups "Nginx-Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nginx-clojure+unsubscribe@googlegroups.com.
To post to this group, send email to nginx-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nginx-clojure/916af9e8-af1a-4029-9030-42972180f4ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages