JuliaWeb / JuliaWeb/GnuTLS.jl

eof(::Session) and read(::Session) don't get along

Open
#26 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
8
Forks
12
PR merge metrics
No merged PRs in 30d

Description

The following prints the complete response then throws a "read: end of file" error. Where as I would expect it to block on `eof` until the connection is closed by the github server.

``` julia
using GnuTLS

sess = GnuTLS.Session()
set_priority_string!(sess)
set_credentials!(sess, GnuTLS.CertificateStore())
associate_stream(sess, connect("github.com", 443))
handshake!(sess)
write(sess, "GET / HTTP/1.1\r\n\r\n")

while !eof(sess)
print(read(sess, Char))
end
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.