HaxeFoundation / HaxeFoundation/haxe

Http.PROXY over https

Open
#6,204 2 comments 0 reactions 1 assignee Claimed by @ncannasse View on GitHub
standard library
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

**Problem**:
Currently `haxe.Http.PROXY` work only over `http`, but now over `https`,
see [this line](https://github.com/HaxeFoundation/haxe/blob/development/std/haxe/Http.hx#L507), and making secure connection not possible without editing `Http.hx`.
**My current workaround**:
Added protocol check of `Http.url`
```haxe
if (secure)
b.add("https://");
else
b.add("http://");
```
This solution is most probably incorrect, as proxy may work only under SSL, and requested URL may be under http.
**Correct (?) solution**:
1. Add `?secure:Bool` to `PROXY` definition.
2. Create Socket accordingly to proxy `secure` boolean if proxy present.
3. Add `secure` local variable check for `http`/`https` provided above.

I may have missed some important bits, that's why this is an issue instead of pull request. :)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.