I don't know anything about jsdom, but from what you said it sounds like 
you're trying to set up a server, to which you can request 
http://myhost/?url=otherhost.com/page.html and it returns that page, and 
then when that pages fetches style.css, it's failing.  You need to rewrite 
what is returned so that on the very first request instead of letting 
otherhost.com/page.html reference "style.css", it instead references a 
valid URL that will get what it needs, e.g. a mapped url that goes through 
your server: http://myhost/?url=otherhost.com/style.css (or, probably just 
"/?url=otherhost.com/style.css").  I have no idea how you'd do that with 
jsdom, but it probably involves changing all hrefs to relative paths to be 
prefixed with "/?url=otherhost.com/" or something.  Without remapping those 
paths, it's trying to fetch the stylesheet from your server, not forwarding 
the request on appropriately.

Hope this helps!
  Jimb Esser

On Wednesday, December 16, 2015 at 5:10:56 PM UTC-8, Roy Mor wrote:
>
> Still struggling with this problem, looking for someone who could shed a 
> light and help me u derstand.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/9ff71a2a-9590-4924-837b-8ceff91aef4c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to