Post
Topic
Board Mining software (miners)
Re: Flexible mining proxy
by
cdhowie
on 04/07/2011, 15:15:38 UTC
Thanks for the proxy. Seems to work pretty well so far.

I did have to make one change to fix a problem with the proxy out of the box. Whenever I submitted a form, I'd be redirected to some other web site (localhost) which has no server running. It appears you're reading SERVER_NAME, which may or may not be correct. It's more reliable to read HTTP_HOST:

Code:
--- a/htdocs/common.inc.php    2011-05-29 22:20:55.000000000 -0400
+++ b/htdocs/common.inc.php      2011-05-29 23:29:49.000000000 -0400
@@ -154,7 +154,7 @@
     $port = ($default_port == $_SERVER['SERVER_PORT']) ? "" :
         ":" . $_SERVER['SERVER_PORT'];
 
-    $base = "$scheme://{$_SERVER['SERVER_NAME']}$port" . get_site_uri();
+    $base = "$scheme://{$_SERVER['HTTP_HOST']}$port" . get_site_uri();
 
     return $base . $uri;
 }

Hey, you still haven't included this fix, as far as I can tell. I just pulled master and it isn't there.
Sorry, I must have missed or forgotten about the original bug report.  The Github issue tracker is where I track bug reports and patches, so if it's not there then there's a good chance I won't remember it.

Patch applied and pushed, thanks!