sockets: simple requests working but not MC
See original GitHub issueThis is working fine:
HTTPSocket httpGet: 'http://source.squeak.org:80/squeak45/
but this fails:
HTTPSocket httpGet: 'http://source.squeak.org/squeak45/' args: nil user: '' passwd: ''
This is with the https://crossorigin.me/ proxy and using the fetch
API.
The proxy does not grant the requested Access-Control-Request-Headers: authorization
, it sends back Access-Control-Allow-Headers: Content-Type
instead. This appears to be ignored by XMLHttpRequest
but fetch
reports an error.
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (9 by maintainers)
Top Results From Across the Web
Not recieving HTTP body with Sockets - Stack Overflow
So the error was that the HTTP headers are sent first, then the body is sent afterwards. Or at least I think that's...
Read more >Socket Timeout — An Important and Sometimes Complicated ...
During my experience working with Python, I've had several cases where a network client was left hanging while trying to request a server....
Read more >Can cURL send requests to sockets? - Super User
sock , and I want to test it by sending a simple request using cURL. Can this be done using cURL? Can it...
Read more >Reading 24: Sockets & Networking
Objectives. In this reading we examine client/server communication over the network using the socket abstraction. Network communication is inherently ...
Read more >How to communicate with other applications using sockets
In the example above, the server is reading from the client in non-blocking mode. That means that the read request will exit instantly....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I don’t mind if you watch me debug this. It’s likely you’ll learn something… I will probably do, too. 😉 Let’s discuss “offline”…
Not exactly the same … we need to allow CORS on source.squeak.org, and we need MC to use https not http.
The https://crossorigin.me/ proxy does not exist anymore
We could try to change it or set up our own proxy, but in general, JavaScript needs CORS to access other servers.