Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 197282 Details for
Bug 299633
[upload] absolute URL in FileUploadServiceHandler
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed patch for proxy compatibility
relative_url.patch (text/plain), 1.42 KB, created by
Austin Riddle
on 2011-06-02 17:59:28 EDT
(
hide
)
Description:
Proposed patch for proxy compatibility
Filename:
MIME Type:
Creator:
Austin Riddle
Created:
2011-06-02 17:59:28 EDT
Size:
1.42 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt.supplemental.fileupload >Index: src/org/eclipse/rap/rwt/supplemental/fileupload/internal/FileUploadServiceHandler.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/incubator/supplemental/fileupload/org.eclipse.rap.rwt.supplemental.fileupload/src/org/eclipse/rap/rwt/supplemental/fileupload/internal/FileUploadServiceHandler.java,v >retrieving revision 1.1 >diff -u -r1.1 FileUploadServiceHandler.java >--- src/org/eclipse/rap/rwt/supplemental/fileupload/internal/FileUploadServiceHandler.java 14 May 2011 16:48:03 -0000 1.1 >+++ src/org/eclipse/rap/rwt/supplemental/fileupload/internal/FileUploadServiceHandler.java 2 Jun 2011 21:55:33 -0000 >@@ -64,11 +64,9 @@ > url.append( IServiceHandler.REQUEST_PARAM ).append( "=" ).append( SERVICE_HANDLER_ID ); > url.append( "&" ); > url.append( PARAMETER_TOKEN ).append( "=" ).append( token ); >- // TODO [rst] Why don't we use the absolute URL? >- // Convert to relative URL, e.g. http://host.port/rap?... -> /rap?... >- int firstSingleSlash = url.indexOf( "/", url.indexOf( "//" ) + 2 ); >- if( firstSingleSlash != -1 ) { >- url.delete( 0, firstSingleSlash ); >+ int relativeIndex = url.lastIndexOf( "/" ); >+ if (relativeIndex > -1) { >+ url.delete( 0, relativeIndex + 1 ); > } > return RWT.getResponse().encodeURL( url.toString() ); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 299633
:
156097
| 197282