This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 209427 - IllegalArgumentException: Illegal character(s) in message header field from HttpURLConnection.checkMessageHeader
Summary: IllegalArgumentException: Illegal character(s) in message header field from H...
Status: RESOLVED FIXED
Alias: None
Product: connecteddeveloper
Classification: Unclassified
Component: Hudson (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks: 193008
  Show dependency tree
 
Reported: 2012-03-11 09:38 UTC by FrantaM
Modified: 2012-07-17 15:55 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 185308


Attachments
stacktrace (1.73 KB, text/plain)
2012-03-11 09:38 UTC, FrantaM
Details

Note You need to log in before you can comment on or make changes to this bug.
Description FrantaM 2012-03-11 09:38:47 UTC
Build: NetBeans IDE 7.1 (Build 201112071828)
VM: Java HotSpot(TM) 64-Bit Server VM, 21.0-b17, Java(TM) SE Runtime Environment, 1.7.0-b147
OS: Windows 7

Stacktrace: 
java.lang.IllegalArgumentException: Illegal character(s) in message header field: 






<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">








<html xmlns
   at sun.net.www.protocol.http.HttpURLConnection.checkMessageHeader(HttpURLConnection.java:460)
   at sun.net.www.protocol.http.HttpURLConnection.isExternalMessageHeaderAllowed(HttpURLConnection.java:431)
   at sun.net.www.protocol.http.HttpURLConnection.setRequestProperty(HttpURLConnection.java:2672)
   at org.netbeans.modules.hudson.impl.ServletConnectionAuthenticator.prepareRequest(ServletConnectionAuthenticator.java:81)
   at org.netbeans.modules.hudson.api.ConnectionBuilder.doConnection(ConnectionBuilder.java:296)
   at org.netbeans.modules.hudson.api.ConnectionBuilder.connection(ConnectionBuilder.java:246)
Comment 1 FrantaM 2012-03-11 09:38:50 UTC
Created attachment 116547 [details]
stacktrace
Comment 2 Jesse Glick 2012-03-14 18:09:20 UTC
JRE bug; HttpURLConnection.setRequestProperty is not allowed to throw IAE. That said, the root problem is likely a server (Hudson instance, proxy, etc.) sending an illegitimate HTTP response - immediate HTML missing any header fields, or some header fields but missing a blank line before body.
Comment 3 Antonin Nebuzelsky 2012-03-16 14:24:37 UTC
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7154502
Comment 4 Jesse Glick 2012-04-19 20:02:00 UTC
Will try to work around the JDK bug by just ignoring invalid requests for the crumbs used to log in without XSRF threats.
Comment 5 Jesse Glick 2012-04-19 20:03:04 UTC
core-main #f4d84194c82b
Comment 6 Quality Engineering 2012-04-21 09:57:25 UTC
Integrated into 'main-golden', will be available in build *201204210400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/f4d84194c82b
User: Jesse Glick <jglick@netbeans.org>
Log: #209427: IllegalArgumentException: Illegal character(s) in message header field from HttpURLConnection.checkMessageHeader