Revision: 29500
          http://sourceforge.net/p/bibdesk/svn/29500
Author:   hofman
Date:     2025-08-30 21:38:35 +0000 (Sat, 30 Aug 2025)
Log Message:
-----------
set method of redirected request to GET

Modified Paths:
--------------
    trunk/bibdesk/BDSKBibDeskProtocol.m

Modified: trunk/bibdesk/BDSKBibDeskProtocol.m
===================================================================
--- trunk/bibdesk/BDSKBibDeskProtocol.m 2025-08-30 17:34:51 UTC (rev 29499)
+++ trunk/bibdesk/BDSKBibDeskProtocol.m 2025-08-30 21:38:35 UTC (rev 29500)
@@ -98,7 +98,7 @@
             welcomeHTMLData = [[self 
HTMLDataUsingTemplateFile:@"WebGroupStartPage" usingObject:[BDSKWebParser 
class]] copy];
         [self loadData:welcomeHTMLData MIMEType:@"text/html"];
     } else if ([DOWNLOADS_SPECIFIER isCaseInsensitiveEqual:resourceSpecifier]) 
{
-        if ([[request HTTPBody] length]) {
+        if ([[request HTTPMethod] isCaseInsensitiveEqual:@"POST"] && [[request 
HTTPBody] length]) {
             NSString *action = [[NSString alloc] initWithData:[request 
HTTPBody] encoding:NSUTF8StringEncoding];
             NSUInteger i = [action rangeOfString:@"&"].location;
             if (i != NSNotFound)
@@ -112,6 +112,7 @@
             // redirect to clear the body, so a reload won't resubmit
             NSURLResponse *response = [[NSURLResponse alloc] 
initWithURL:theURL MIMEType:@"text/html" expectedContentLength:-1 
textEncodingName:nil];
             NSMutableURLRequest *redirectRequest = [request mutableCopy];
+            [redirectRequest setHTTPMethod:@"GET"];
             [redirectRequest setHTTPBody:nil];
             [client URLProtocol:self wasRedirectedToRequest:redirectRequest 
redirectResponse:response];
             [client URLProtocolDidFinishLoading:self];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to