prerender-java icon indicating copy to clipboard operation
prerender-java copied to clipboard

400 bad request on localhost and returned html is empty ""

Open nakulpanwar opened this issue 4 years ago • 0 comments

While testing on the localhost, I am unable to get the crawled HTML page.

I have run a prerender server at my local on http://localhost:3000, and if I directly hit the browser using http://localhost:3000/https://localhost/ I can get the prerendered version of my application (running on https://localhost/).

Now if I try to test it using https://localhost/?_escaped_fragment_= as mentioned in the docs that time it failed with error page on Chrome saying - HTTP ERROR 400

I am sharing some information that I get while debugging -

apiUrl = http://localhost:3000/https://localhost/

prerenderServerResponse = HttpResponseProxy{HTTP/1.1 400 Bad Request [Content-Type: text/html;charset=UTF-8, Vary: Accept-Encoding, Date: Sun, 06 Sep 2020 23:40:07 GMT] ResponseEntityProxy{[Content-Type: text/html;charset=UTF-8,Chunked: false]}}

Method name is proxyPrerenderedPageResponse and class name is com.github.greengerong.PrerenderSeoService.

nakulpanwar avatar Sep 07 '20 00:09 nakulpanwar