Skip to content

Fix where redirecting URLs may not include schemes or hosts#24

Closed
belphegor-belbel wants to merge 1 commit into
NSIS-Dev:masterfrom
belphegor-belbel:master
Closed

Fix where redirecting URLs may not include schemes or hosts#24
belphegor-belbel wants to merge 1 commit into
NSIS-Dev:masterfrom
belphegor-belbel:master

Conversation

@belphegor-belbel

Copy link
Copy Markdown

Section 7.1.2 in RFC-7231 defines a "Location:" header for specifying the destination URL,
it may not contain schemes or hosts as shown in the example ("Location: /People.html#tim").

https://www.rfc-editor.org/rfc/rfc7231

However in NSISdl current implementation, the Location header's content is passed to the
connect() method as-is, so the first part up to "/" is interpreted as the host name,
so it fails.

This patch makes it possible to regenerate the destination URL from the original one.

@sredna

sredna commented Aug 2, 2023

Copy link
Copy Markdown
Member
  • Hardcodes buffer size of 1024
  • Does not support //host/path relative URLs?

@sredna sredna closed this Aug 2, 2023
@jaimergp jaimergp mentioned this pull request Jul 11, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants