[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    re-route a folder to another port on the web server
From:       "Tim Johanson" <timjohanson () gmail ! com>
Date:       2008-08-28 6:26:49
Message-ID: 915ad26b0808272326u3a63476am7088fef57d8c3637 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


I have a busy box system which includes the vanilla busy box web server,
listening on port 80, and also my own http server that processes data
requests and listens on my own custom-designed port: 3420.  I'm using Ajax
and Javascript to create a web app, and my original intention was that the
pages (hosted on busy box as http://myip) could simply fetch data from my
http server as http://myip:3420.  But, I just learned that Ajax doesn't
allow this; it's a security violation because http://myip and
http://myip:3420 are treated as separate apps.  So I need to have it go to
busybox as a directory (ie http://myip/3420) and have busybox forward the
requests to my server on port 3420.  The problem is it needs to be very
efficient, and if I do this with a cgi script, that cgi app will get spawned
for each request.

Is there an easy way to do this in busybox's web server without changing the
code?  If not, I'm not familiar at all with busybox's code, so could anybody
tell me what source file/function I should go to if I need to write a "hack"
that looks at the incoming requests to see if it's for "/3420" and if so,
forward the rest of the URL to my app and and then forward my app's reply
back to the calling app.  Any suggestions?

Thanks.

[Attachment #5 (text/html)]

<div dir="ltr">I have a busy box system which includes the vanilla busy box web \
server, listening on port 80, and also my own http server that processes data \
requests and listens on my own custom-designed port: 3420.&nbsp; I&#39;m using Ajax \
and Javascript to create a web app, and my original intention was that the pages \
(hosted on busy box as <a href="http://myip">http://myip</a>) could simply fetch data \
from my http server as <a href="http://myip:3420">http://myip:3420</a>.&nbsp; But, I \
just learned that Ajax doesn&#39;t allow this; it&#39;s a security violation because \
<a href="http://myip">http://myip</a> and <a \
href="http://myip:3420">http://myip:3420</a> are treated as separate apps.&nbsp; So I \
need to have it go to busybox as a directory (ie <a \
href="http://myip/3420">http://myip/3420</a>) and have busybox forward the requests \
to my server on port 3420.&nbsp; The problem is it needs to be very efficient, and if \
I do this with a cgi script, that cgi app will get spawned for each request.<br> \
<br>Is there an easy way to do this in busybox&#39;s web server without changing the \
code?&nbsp; If not, I&#39;m not familiar at all with busybox&#39;s code, so could \
anybody tell me what source file/function I should go to if I need to write a \
&quot;hack&quot; that looks at the incoming requests to see if it&#39;s for \
&quot;/3420&quot; and if so, forward the rest of the URL to my app and and then \
forward my app&#39;s reply back to the calling app.&nbsp; Any suggestions?<br> \
<br>Thanks.<br></div>



_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic