Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 3.1, 3.2
-
Fix Version/s: 3.2
-
Component/s: Sample Apps, Tool Integrations
-
Labels:None
-
Environment:any
Description
It was found that httpRequest.getLocalName() in the SourceCodeLoaderConnection.java was returning an 0:0.0:0.0:0.0:1 for the device's IP address in environment, which have 2 nic interfaces and one of them is not bound to any ip. so that the contructed URL is a malformated one.
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Migration
created issue -
Migration
made changes -
Field | Original Value | New Value |
---|---|---|
Reporter | Migration [ remote ] | Liming Wu [ liming.wu ] |
Migration
made changes -
Assignee | Liming Wu [ liming.wu ] | |
Description |
It was found that httpRequest.getLocalName() in the SourceCodeLoaderConnection.java was returning an 0:0.0:0.0:0.0:1 for the device's IP address in environment, which have 2 nic interfaces and one of them is not bound to any ip. so that the contructed URL is a malformated one. By looking the source and noticed the url SOURCE_SERVLET_URL is constructed by httpRequest.getLocalName() as shown: SOURCE_SERVLET_URL = "http://" + httpRequest.getLocalName() + ":" + httpRequest.getLocalPort() + httpRequest.getContextPath() + "/"; This is not reliable as getLocalName() may not return something url friendly. due to various native layer variations. It should be replaced by String hostName = "localhost"; try { URL requestUrl = new URL(httpRequest.getRequestURL().toString()); hostName = requestUrl.getHost(); } catch (MalformedURLException mfException) {} SOURCE_SERVLET_URL = "http://" + hostName + ":" + httpRequest.getLocalPort() + httpRequest.getContextPath() + "/"; |
It was found that httpRequest.getLocalName() in the SourceCodeLoaderConnection.java was returning an 0:0.0:0.0:0.0:1 for the device's IP address in environment, which have 2 nic interfaces and one of them is not bound to any ip. so that the contructed URL is a malformated one. |
Migration
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Fix Version/s | 3.2 [ 10338 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |