Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F138069020
D46318.id142168.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D46318.id142168.diff
View Options
diff --git a/lib/libfetch/fetch.c b/lib/libfetch/fetch.c
--- a/lib/libfetch/fetch.c
+++ b/lib/libfetch/fetch.c
@@ -447,7 +447,10 @@
goto ouch;
}
u->doc = doc;
- while (*p != '\0') {
+ /* fragments are reserved for client-side processing, see
+ * https://www.rfc-editor.org/rfc/rfc9110.html#section-7.1
+ */
+ while (*p != '\0' && *p != '#') {
if (!isspace((unsigned char)*p)) {
*doc++ = *p++;
} else {
diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c
--- a/lib/libfetch/http.c
+++ b/lib/libfetch/http.c
@@ -1593,7 +1593,6 @@
off_t offset, clength, length, size;
time_t mtime;
const char *p;
- char *fragment;
FILE *f;
hdr_t h;
struct tm *timestruct;
@@ -1633,13 +1632,6 @@
size = -1;
mtime = 0;
- /* fragments are reserved for client-side processing, see
- * https://www.rfc-editor.org/rfc/rfc9110.html#section-7.1
- */
- if ((fragment = strchr(url->doc, '#')) != NULL) {
- *fragment = '\0';
- }
-
/* check port */
if (!url->port)
url->port = fetch_default_port(url->scheme);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 29, 3:31 PM (12 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26343195
Default Alt Text
D46318.id142168.diff (1 KB)
Attached To
Mode
D46318: libfetch: don't include fragments in HTTP requests
Attached
Detach File
Event Timeline
Log In to Comment