| Summary: | [upload] absolute URL in FileUploadServiceHandler | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | falko | ||||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | austin.riddle, a_mergey, stefan.roeck | ||||||
| Version: | 1.0 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
falko
Created attachment 156097 [details]
path for FileUploadServiceHandler
This has been fixed with 301280. the code now has changed to: --- // convert to relative URL int firstSlash = url.indexOf( "/" , url.indexOf( "//" ) + 2 ); // first slash after double slash of "http://" url.delete( 0, firstSlash ); //Result is sth like"/rap?custom_service_handler..." return RWT.getResponse().encodeURL(url.toString()); --- which still does not work behind a reverse-proxy; "/rap?custom_service_handler.." is not a relative URL; second line needs to be changed to: url.delete( 0, firstSlash + 1 ); Because of this bug, the new FileDialog (and more generally FileUpload using url given by FileUploadServiceHandler) doesn't work if the application is packaged as a WAR file and deployed in server like tomcat. Changes suggested by falko@polymap.de fixes it ( url.delete( 0, firstSlash + 1 ); ) Created attachment 197282 [details]
Proposed patch for proxy compatibility
Hello Arnaud and Falko,
Please see if this patch fixes the problem in your environment.
Hello, I have tested your patch, and it fixes the issue in my environment (RAP application deployed as a WAR file in Tomcat) In my previous comment, I forgot to mention In my case I am not behind an HTTP reverse-proxy It seems this issue prevent FileDialog to be working when RAP application is package as a legacy WAR file. So your patch is welcome, thanks :) Patch committed to CVS HEAD. Unless FileDialog HEAD will be usable with RAP 1.4, would it be possible to backport your fix in 1.4 maintenance branch ? I am quite sure packaging RAP application as a legacy war file is a usual use case for RAP, and if FileDialog HEAD is not usable with RAP 1.4, it prevents it to be used in this case. |