mitre / mitre/HTTP-Proxy-Servlet

ProxyServlet copyResponseHeaders double?

Open
#80 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
1.5k
Forks
557
PR merge metrics
No merged PRs in 30d

Description

Hi,

When using this servlet, the https://github.com/mitre/HTTP-Proxy-Servlet/blob/master/src/main/java/org/mitre/dsmiley/httpproxy/ProxyServlet.java , copyResponseHeaders seems to copy response headers, but the HttpServletResponse already contains the headers, so the calling application (js frontend) receives double headers, which it doesn't accept. Any reason why this copy is done when the servletresponse already contains them, or why they are appended? (Besides, isn't it better to set the header in this case, instead of adding them?)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read src/main/java/org/mitre/dsmiley/httpproxy/ProxyServlet.java, focusing on copyResponseHeaders and the HttpServletResponse state before it runs. Reproduce a proxied response with duplicate headers and determine the expected header behavior; the issue is done when the calling frontend no longer receives unintended duplicates.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.