diff options
Diffstat (limited to 'src/gmrequest.c')
-rw-r--r-- | src/gmrequest.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gmrequest.c b/src/gmrequest.c index ad0c5ed7..25ff90af 100644 --- a/src/gmrequest.c +++ b/src/gmrequest.c | |||
@@ -163,8 +163,6 @@ static void requestFinished_GmRequest_(iAnyObject *obj) { | |||
163 | } | 163 | } |
164 | SDL_RemoveTimer(d->timeoutId); | 164 | SDL_RemoveTimer(d->timeoutId); |
165 | d->timeoutId = 0; | 165 | d->timeoutId = 0; |
166 | // iReleaseLater(d->req); | ||
167 | // d->req = NULL; | ||
168 | d->state = finished_GmRequestState; | 166 | d->state = finished_GmRequestState; |
169 | unlock_Mutex(&d->mutex); | 167 | unlock_Mutex(&d->mutex); |
170 | iNotifyAudience(d, finished, GmRequestFinished); | 168 | iNotifyAudience(d, finished, GmRequestFinished); |
@@ -193,6 +191,15 @@ void submit_GmRequest(iGmRequest *d) { | |||
193 | else if (endsWithCase_String(path, ".txt")) { | 191 | else if (endsWithCase_String(path, ".txt")) { |
194 | setCStr_String(&d->header, "text/plain"); | 192 | setCStr_String(&d->header, "text/plain"); |
195 | } | 193 | } |
194 | else if (endsWithCase_String(path, ".png")) { | ||
195 | setCStr_String(&d->header, "image/png"); | ||
196 | } | ||
197 | else if (endsWithCase_String(path, ".jpg") || endsWithCase_String(path, ".jpeg")) { | ||
198 | setCStr_String(&d->header, "image/jpeg"); | ||
199 | } | ||
200 | else if (endsWithCase_String(path, ".gif")) { | ||
201 | setCStr_String(&d->header, "image/gif"); | ||
202 | } | ||
196 | else { | 203 | else { |
197 | setCStr_String(&d->header, "application/octet-stream"); | 204 | setCStr_String(&d->header, "application/octet-stream"); |
198 | } | 205 | } |