diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-08 07:50:17 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-08 07:50:17 +0200 |
commit | c0280998be065ab075581e46c52c6cc27e4b21a9 (patch) | |
tree | 9f4156beb6ef6a01605bafb8c81ae6885e8eced7 /src/gmrequest.c | |
parent | 0e03a97ba89bb9e8fccf6978250addc14799c5c1 (diff) |
Gopher improvements
Asking for query text with item type 7. Enhanced ASCII art detection.
Diffstat (limited to 'src/gmrequest.c')
-rw-r--r-- | src/gmrequest.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gmrequest.c b/src/gmrequest.c index d143e8da..e65847e1 100644 --- a/src/gmrequest.c +++ b/src/gmrequest.c | |||
@@ -373,7 +373,7 @@ static void gopherError_GmRequest_(iGmRequest *d, iSocket *socket, int error, co | |||
373 | lock_Mutex(&d->mutex); | 373 | lock_Mutex(&d->mutex); |
374 | d->state = failure_GmRequestState; | 374 | d->state = failure_GmRequestState; |
375 | d->resp.statusCode = tlsFailure_GmStatusCode; | 375 | d->resp.statusCode = tlsFailure_GmStatusCode; |
376 | format_String(&d->resp.meta, "(%d) %s", error, msg); | 376 | format_String(&d->resp.meta, "%s (errno %d)", msg, error); |
377 | clear_Block(&d->resp.body); | 377 | clear_Block(&d->resp.body); |
378 | unlock_Mutex(&d->mutex); | 378 | unlock_Mutex(&d->mutex); |
379 | iNotifyAudience(d, finished, GmRequestFinished); | 379 | iNotifyAudience(d, finished, GmRequestFinished); |
@@ -392,6 +392,12 @@ static void beginGopherConnection_GmRequest_(iGmRequest *d, const iString *host, | |||
392 | iConnect(Socket, d->gopher.socket, disconnected, d, gopherDisconnected_GmRequest_); | 392 | iConnect(Socket, d->gopher.socket, disconnected, d, gopherDisconnected_GmRequest_); |
393 | iConnect(Socket, d->gopher.socket, error, d, gopherError_GmRequest_); | 393 | iConnect(Socket, d->gopher.socket, error, d, gopherError_GmRequest_); |
394 | open_Gopher(&d->gopher, &d->url); | 394 | open_Gopher(&d->gopher, &d->url); |
395 | if (d->gopher.needQueryArgs) { | ||
396 | d->resp.statusCode = input_GmStatusCode; | ||
397 | setCStr_String(&d->resp.meta, "Enter query:"); | ||
398 | d->state = finished_GmRequestState; | ||
399 | iNotifyAudience(d, finished, GmRequestFinished); | ||
400 | } | ||
395 | } | 401 | } |
396 | 402 | ||
397 | /*----------------------------------------------------------------------------------------------*/ | 403 | /*----------------------------------------------------------------------------------------------*/ |