Page MenuHomeSoftware Heritage

browse/origin-search: Percent encode ? character only in origin URL
ClosedPublic

Authored by anlambert on Nov 9 2022, 5:05 PM.

Details

Summary

When an origin URL is provided as URL argument to a Web API call performed
by XHR, only percent encode the '?' character as using encodeURIComponent
results in a 404 error in production and staging otherwise (maybe a side
effect of Varnish cache).

Related to T4675

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build has FAILED

Patch application report for D8826 (id=31819)

Rebasing onto 64b3d74a82...

Current branch diff-target is up to date.
Changes applied before test
commit 4bd225b8225c7f788e1767f5e1bc3e7cd26cb811
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Nov 9 17:02:49 2022 +0100

    browse/origin-search: Percent encode ? character only in origin URL
    
    When an origin URL is provided as URL argument to a Web API call performed
    by XHR, only percent encode the '?' character as using encodeURIComponent
    results in a 404 error in production and staging otherwise (maybe a side
    effect of Varnish cache).
    
    Related to T4675

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/2127/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/2127/console

Harbormaster returned this revision to the author for changes because remote builds failed.Nov 9 2022, 5:15 PM
Harbormaster failed remote builds in B32758: Diff 31819!

Build is green

Patch application report for D8826 (id=31819)

Rebasing onto 64b3d74a82...

Current branch diff-target is up to date.
Changes applied before test
commit 4bd225b8225c7f788e1767f5e1bc3e7cd26cb811
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Nov 9 17:02:49 2022 +0100

    browse/origin-search: Percent encode ? character only in origin URL
    
    When an origin URL is provided as URL argument to a Web API call performed
    by XHR, only percent encode the '?' character as using encodeURIComponent
    results in a 404 error in production and staging otherwise (maybe a side
    effect of Varnish cache).
    
    Related to T4675

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/2128/ for more details.

This revision was not accepted when it landed; it landed in state Needs Review.Nov 9 2022, 5:25 PM
anlambert requested review of this revision.
This revision was automatically updated to reflect the committed changes.