Skip to content

Commit

Permalink
Fix header passthrough on DICOM forwarding (0th header key may be nul…
Browse files Browse the repository at this point in the history
…l when the 0th header value is the HTTP status line)
  • Loading branch information
abjonnes committed Nov 29, 2018
1 parent 6d08017 commit 1b4a419
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ private void forwardRequest(String prefix, HttpServletRequest req, HttpServletRe
resp.setStatus(conn.getResponseCode());
for (int i = 0; ; ++i) {
final String header = conn.getHeaderFieldKey(i);
if (header == null) break;
final String value = conn.getHeaderField(i);
resp.setHeader(header, value);
if (header == null && value == null) break;
if (header != null) resp.setHeader(header, value);
}

InputStream is = conn.getInputStream();
Expand Down

0 comments on commit 1b4a419

Please sign in to comment.