edit: Catch-22 has a more comprehensive patch below. Look at that instead.
As hinted at in Zarqon's post regarding why BatBrain et al were broken, Mafia currently only follows 302s. The attached patch amends this.
edit: contents, for those that don't feel like downloading the patch to read through it:
As hinted at in Zarqon's post regarding why BatBrain et al were broken, Mafia currently only follows 302s. The attached patch amends this.
edit: contents, for those that don't feel like downloading the patch to read through it:
Code:
Index: src/net/sourceforge/kolmafia/request/GenericRequest.java
===================================================================
--- src/net/sourceforge/kolmafia/request/GenericRequest.java (revision 11565)
+++ src/net/sourceforge/kolmafia/request/GenericRequest.java (working copy)
@@ -1647,7 +1647,7 @@
{
istream = this.formConnection.getInputStream();
this.responseCode = this.formConnection.getResponseCode();
- this.redirectLocation = this.responseCode != 302 ? null : this.formConnection.getHeaderField( "Location" );
+ this.redirectLocation = this.responseCode != 302 && this.responseCode != 301 ? null : this.formConnection.getHeaderField( "Location" );
}
catch ( SocketTimeoutException e )
{
Attachments
Last edited: