I am trying to create some tests for web services that implement CORS. So, I need to send Origin headers. When I call addRequestProperty("origin", origin) , the source header does not appear on the server. I say βit seemsβ - I have a servlet repeating all the headers that print them, and it does not appear. I did not go all the way to TCPMon or sent a request through a normal socket connection.
The javadoc for the HttpUrlConnection does not mention the restrictions that I saw, but I could skip the critical sentence. Is this a known limitation?
source share