summaryrefslogtreecommitdiff
path: root/src/gmrequest.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-12-12 12:39:21 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-12-12 12:39:21 +0200
commit8864cc5aee3b134b0ffc5f53c1593645f4109f8c (patch)
treeae06a5d64bd72521b447d1abc984f6d2e171e0cb /src/gmrequest.c
parent7bc2f1b1dd089bfd362ad04dad47ab38c6d9ff37 (diff)
Added option to show URL paths as encoded or decoded
IssueID #73
Diffstat (limited to 'src/gmrequest.c')
-rw-r--r--src/gmrequest.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gmrequest.c b/src/gmrequest.c
index 991485bc..1f922142 100644
--- a/src/gmrequest.c
+++ b/src/gmrequest.c
@@ -482,8 +482,6 @@ void deinit_GmRequest(iGmRequest *d) {
482 deinit_Gopher(&d->gopher); 482 deinit_Gopher(&d->gopher);
483 delete_Audience(d->finished); 483 delete_Audience(d->finished);
484 delete_Audience(d->updated); 484 delete_Audience(d->updated);
485// delete_GmResponse(d->respPub);
486// deinit_GmResponse(&d->respInt);
487 delete_GmResponse(d->resp); 485 delete_GmResponse(d->resp);
488 deinit_String(&d->url); 486 deinit_String(&d->url);
489 delete_Mutex(d->mtx); 487 delete_Mutex(d->mtx);
@@ -494,6 +492,10 @@ void setUrl_GmRequest(iGmRequest *d, const iString *url) {
494 /* Encode hostname to Punycode here because we want to submit the Punycode domain name 492 /* Encode hostname to Punycode here because we want to submit the Punycode domain name
495 in the request. (TODO: Pending possible Gemini spec change.) */ 493 in the request. (TODO: Pending possible Gemini spec change.) */
496 punyEncodeUrlHost_String(&d->url); 494 punyEncodeUrlHost_String(&d->url);
495 /* TODO: Gemini spec allows UTF-8 encoded URLs, but still need to percent-encode non-ASCII
496 characters? Could be a server-side issue, e.g., if they're using a URL parser meant for
497 the web. */
498 urlEncodePath_String(&d->url);
497 urlEncodeSpaces_String(&d->url); 499 urlEncodeSpaces_String(&d->url);
498} 500}
499 501