Answer the question
In order to leave comments, you need to log in
Server returns invalid header(java, HttpClient). How to overcome?
There is a resource of our partners. When trying to get data from it via http nginx periodically instead of the standard response like "HTTP/1.1 200 OK", it returns one character '>'. I fight the second day, can someone come across?
I'm using HttpClient from Apache, version 4.1.2. nginx-1.0.10
Answer the question
In order to leave comments, you need to log in
try to manually (telnet) pull
it, or chrome has a plugin convenient for this - Advanced REST Client is called
see what it returns,
maybe they check the user agent to protect against scanning bots
Most likely they have a bug in some php script. Maybe write to them, they say, what the hell ...
if absolutely nothing can be done with the server, then override the HttpClient class,
find where it pulls the header there and process the incorrect situation there.
it is possible that some other class of the library will have to be overridden, but the essence is clear. we have OOP, you can inherit and overlap.
So it happens anyway)
If it doesn’t help, then pull the sockets yourself, but I wouldn’t want to
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question