Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 299633 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/rap/rwt/supplemental/fileupload/internal/FileUploadServiceHandler.java (-5 / +3 lines)
Lines 64-74 Link Here
64
    url.append( IServiceHandler.REQUEST_PARAM ).append( "=" ).append( SERVICE_HANDLER_ID );
64
    url.append( IServiceHandler.REQUEST_PARAM ).append( "=" ).append( SERVICE_HANDLER_ID );
65
    url.append( "&" );
65
    url.append( "&" );
66
    url.append( PARAMETER_TOKEN ).append( "=" ).append( token );
66
    url.append( PARAMETER_TOKEN ).append( "=" ).append( token );
67
    // TODO [rst] Why don't we use the absolute URL?
67
    int relativeIndex = url.lastIndexOf( "/" );
68
    // Convert to relative URL, e.g. http://host.port/rap?... -> /rap?...
68
    if (relativeIndex > -1) {
69
    int firstSingleSlash = url.indexOf( "/", url.indexOf( "//" ) + 2 );
69
      url.delete( 0, relativeIndex + 1 );
70
    if( firstSingleSlash != -1 ) {
71
      url.delete( 0, firstSingleSlash );
72
    }
70
    }
73
    return RWT.getResponse().encodeURL( url.toString() );
71
    return RWT.getResponse().encodeURL( url.toString() );
74
  }
72
  }

Return to bug 299633