Does HTTP Forward request preserve the referer in the header?
I have a Java HttpServlet which uses the forward command from RequestDispatcher to send the user somewhere else sometimes. Does the HTTP Referer Header get preserved from the original request on forward? (I believe with redirect it doesnt). My feeling is that it is preserved since I think the client never knows ab开发者_Python百科out the forward.
Yes, it does, a forward inside the same server is just giving someone else the option to handle the request and the request and response objects usually go unchanged (unless you build a filter that changes these objects).
精彩评论