Forum

Posted by
Matthew Hardy  -  March 2012
5.1-185 issue with files not returning right... fix.



--- Roxen.pmod.orig 2012-03-06 23:39:59.386668170 +0100
+++ Roxen.pmod 2012-03-06 23:40:22.678375353 +0100
@@ -2966,10 +2966,10 @@
   string res = sprintf("%s", uri);
   // +(id->misc->path_info?id->misc->path_info:"");
   if (has_prefix(res, "://") && !has_prefix(file, "://") &&
-      (!id || !has_prefix(id->not_query, "://"))) {
+      (!id || !id->not_query || !has_prefix(id->not_query, "://"))) {
     // No scheme.
     if (!has_prefix(file, "//") &&
- (!id || !has_prefix(id->not_query, "//"))) {
+ (!id || !id->not_query || !has_prefix(id->not_query, "//"))) {
       // No host.
       return res[sizeof("://")..];
     }
 
Posted by
Matthew Hardy  -  April 2012
5.2.200 also plays nicer for me with this patch.
Is it just me?
 
Posted by
Henrik Grubbstrom  -  March 2013
I can't apply this without knowing what it attempts to fix.

Please provide the corresponding backtrace from the debug log.
 
Posted by
Matthew Hardy  -  April 2016
I seemed to reproduce this with a relatively new Roxen 6 and 8.0.227 - legacy is a support issue ;)
There is some old rxml thiny going on I think, tbh, unsure why res is UNDEFINED.

Our patch still sorts the backtrace as per below.
But considering we simply don't use rxml anymore in this context, this is I hope something for general posterity.
-------

Internal server error: Bad argument 1 to has_prefix(). Expected string|object.
          : Unknown program: has_prefix(UNDEFINED,"://")
          : etc/modules/Roxen.pmod (7db68f4b):3265: Roxen.fix_relative("/public/images/jobtasklogin.png",RequestID(/css/style.css))
14:12:01  : modules/tags/rxmltags.pike (80153425):7423: TagIfExists(if#exists)->eval("/public/images/jobtasklogin.png",@0=RequestID(/css/style.css))
33m 4.4s  : modules/tags/rxmltags.pike (80153425):6291: Frame(if)->do_enter(@0)
          : etc/modules/RXML.pmod/module.pmod (58e5ada8):4624: Frame(if)->_eval(Context(),RXML.PXml(RXML.t_html(text/html, xml),RXMLTagSet(the-site,rxml_tag_set)),RXML.t_html(text/html, xml))
          :
etc/modules/RXML.pmod/module.pmod (58e5ada8):484: TagIf(if)->_p_xml_handle_tag(@1=RXML.PXml(RXML.t_html(text/html, xml),RXMLTagSet(the-site,rxml_tag_set)),mapping[1],"\n\t\t\t\t<cimg src='/public/images/jobtasklogin.png' format='png' /><br />\n                ")
          : /usr/local/pike/pike/8.0.227/lib/modules/Parser.pmod/_parser.so:1: RXML.PXml(RXML.t_html(text/html, xml),RXMLTagSet(the-site,rxml_tag_set))->finish("<html>\n<head>\n<META NAME='ROBOTS' CONTENT='NOINDEX, NOFOLLOW'>\n<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n\n<link rel='icon' type='image/x-icon' href='/public/images/favico"+[4013])
          : etc/modules/RXML.pmod/PXml.pike (f9f92d22):385: RXML.PXml(RXML.t_html(text/html, xml),RXMLTagSet(the-site,rxml_tag_set))->finish("<html>\n<head>\n<META NAME='ROBOTS' CONTENT='NOINDEX, NOFOLLOW'>\n<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n\n<link rel='icon' type='image/x-icon' href='/public/images/favico"+[4013])
14:12:01  : etc/modules/RXML.pmod/module.pmod (58e5ada8):5638: RXML.PXml(RXML.t_html(text/html, xml),RXMLTagSet(the-site,rxml_tag_set))->write_end("<html>\n<head>\n<META NAME='ROBOTS' CONTENT='NOINDEX, NOFOLLOW'>\n<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n\n<link rel='icon' type='image/x-icon' href='/public/images/favico"+[4013])
33m 4.4s  : base_server/rxml.pike (17607848):291: Configuration(the-site)->parse_rxml("<html>\n<head>\n<META NAME='ROBOTS' CONTENT='NOINDEX, NOFOLLOW'>\n<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n\n<link rel='icon' type='image/x-icon' href='"+[4034],@0,UNDEFINED,mapping[7])
          : etc/modules/Roxen.pmod (7db68f4b):650: Roxen.http_rxml_answer("<html>\n<head>\n<META NAME='ROBOTS' CONTENT='NOINDEX, NOFOLLOW'>\n<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n\n<link rel='icon' type='image/x-icon' href='/"+[4033],@0,UNDEFINED,UNDEFINED)
          : /var/www/modules/auth_cookie.pike:179: RoxenModule(the-site/auth_cookie#0)->authenticate_throw(@0,"User",UNDEFINED)
          : base_server/configuration.pike (fab59f3d):1316: Configuration(the-site)->authenticate_throw(@0,"User",UNDEFINED)
          : -:33: -:3()->vary_cb("/css/style.css",@0)
14:12:01  : base_server/configuration.pike (fab59f3d):464: Configuration(the-site)->datacache->get("/css/style.css",@0)
33m 4.4s  : protocols/http.pike (a8e1a929):3348: RequestID(/css/style.css)->got_data(0,"GET /css/style.css HTTP/1.1\r\nHost: v1.editmaster.net\r\nAccept-Encoding: gzip, deflate\r\nCookie: NewWebhavenUserID=304f25b509f57cd58f79763e392e9a83\r\nConnection: keep-alive\r\nAccept: text/css"+[224],UNDEFINED)
          : /usr/local/pike/pike/8.0.227/lib/modules/SSL.pmod/File.pike:1128: SSL.File(Stdio.File("socket", "80.62.117.144 34087", 777 /* fd=15 */), SSL.ServerConnection(ready))->internal_poll()
          : -:1: Pike.Backend(0)->`()(3600.0)
 
1
Search this thread: