JuliaWeb/HTTP.jl

Support for domain sockets

已关闭

#607 创建于 2020年10月27日

 (2 条评论) (0 个反应) (0 位负责人)Julia (182 个派生)batch import
enhancementhelp wanted

仓库指标

星标
 (679 个星标)
PR 合并指标
 (平均合并 2天 5小时) (30 天内合并 40 个 PR)

描述

I was trying to communicate with a local domain socket that accepts HTTP, which I'm currently doing like so:

docker = connect("/var/run/docker.sock")
write(docker, """
    GET /info HTTP/1.1
    Host: localhost
    Accept: application/json


    """)
@show read(docker, String)
close(docker)

That doesn't really work with HTTP.jl right now, the connection layer doesn't support these sockets, and there isn't a way to separate the path to the socket from the path to request. One interesting approach by https://github.com/msabramo/requests-unixsocket is using the following URI format: http+unix://%2Fvar%2Frun%2Fdocker.sock/info.

贡献者指南