Node-static can not serve json file

57 views
Skip to first unread message

Thuan le minh

unread,
Oct 3, 2012, 3:47:13 AM10/3/12
to nod...@googlegroups.com
Hi,
i am trying to create caching http proxy server with node.js and i use node-static as middleware for caching module .
i tested my app on my browser : localhost:8080/?url=http://google.com, it ran ok .
but when i test it with any website that include json content such as : http://application.pedev.lan:8080/abc/ext/oxplorer?content=abc&login=abc&pass=abc&format=json
it can not run .
any body can help me ?

Ryan Schmidt

unread,
Oct 3, 2012, 3:58:26 AM10/3/12
to nod...@googlegroups.com
Why can't it run? What error occurs?

Can we see your code anywhere?


Thuan le minh

unread,
Oct 3, 2012, 4:21:26 AM10/3/12
to nod...@googlegroups.com
i think i don't parse json on my code ?
my code is attacted
node-proxy.js

Diogo Resende

unread,
Oct 3, 2012, 4:46:51 AM10/3/12
to nod...@googlegroups.com
I did not debug the code and can't tell you what's wrong but you're missing one thing on p_request, you're not sending the original headers to the sub request (just 'host'). Perhaps that might be originating the block from it.. or you're missing more stuff?

-- 
Diogo Resende

--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Attachments:
- node-proxy.js

Reply all
Reply to author
Forward
0 new messages