Superficially this seems like it should work to me. Is there a reason you're 
not just using a normal http client and doing http in a socket by hand? That's 
likely a huge source of bugs.


On Nov 13, 2011, at 9:09 PM, Collin Brooks wrote:

> I'm interested in downloading a file from my git repo using an HTTP GET 
> request. I'm able to do this through cUrl by connecting to 
> myArbitraryProjectName.googlecode.com:80/git/src/theFileIWant.jsx but, when 
> attempting to fetch the file from within a Socket object in ExtendScript 
> (Adobe's extended version of JavaScript that allows you to script 
> applications in its Creative Suite), I get a 404 error.
> 
> I'm not asking for help with the ExtendScript Socket Object, I'm just 
> wondering if I need to send certain headers with the GET request in order 
> to get it to work. Here are the details of my GET request:
> 
> The host I'm connecting to is "myArbitraryProjectName.googlecode.com:80" 
> (where myArbitraryProjectName is any project name). The following header is 
> sent: "GET /git/src/theFileIWant.jsx HTTP/1.1\n\n" where (theFileIWant.jsx 
> is a file I want).

rfc2616 mandantes use of \r\n as the EOL separator, not \n, so you should be 
doing ...HTTP/1.1\r\n\r\n at a minimum.

> Here is the HEAD that I get back:
> 
> HTTP/1.1 404 Not Found
>> Content-Type: text/html; charset=UTF-8
>> X-Content-Type-Options: nosniff
>> Date: Mon, 14 Nov 2011 03:04:25 GMT
>> Server: sffe
>> Content-Length: 11803
>> X-XSS-Protection: 1; mode=block
> 
> 
> Are there any other headers I need to send with my request in order to get 
> it to work?

Can you provide a more specific project/file pair? 
http://git-core.googlecode.com/git/README loads just fine for me.

> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Project Hosting on Google Code" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/google-code-hosting/-/Ec2kUOsErzsJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/google-code-hosting?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Project Hosting on Google Code" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-code-hosting?hl=en.

Reply via email to