HaxeFoundation / HaxeFoundation/haxe
Http.PROXY over https
- 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
Assessment
This issue has not been assessed yet.