rolha_ has quit [Remote host closed the connection]
rolha_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
soveran has quit [Remote host closed the connection]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox has joined #crystal-lang
rolha__ has joined #crystal-lang
rolha___ has joined #crystal-lang
rolha has quit [Ping timeout: 244 seconds]
rolha_ has quit [Ping timeout: 276 seconds]
rolha has joined #crystal-lang
rolha_ has joined #crystal-lang
rolha__ has quit [Ping timeout: 260 seconds]
rolha___ has quit [Ping timeout: 264 seconds]
rolha__ has joined #crystal-lang
rolha___ has joined #crystal-lang
Ven has joined #crystal-lang
rolha_ has quit [Ping timeout: 244 seconds]
rolha has quit [Ping timeout: 260 seconds]
rolha___ has quit [Client Quit]
trapped has joined #crystal-lang
rolha has joined #crystal-lang
Rinkana has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox has quit [Ping timeout: 260 seconds]
rolha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rinkanazu has joined #crystal-lang
trapped_ has joined #crystal-lang
trapped has quit [Disconnected by services]
trapped_ is now known as trapped
sandelius has joined #crystal-lang
Rinkana has quit [Ping timeout: 264 seconds]
rolha has joined #crystal-lang
rolha__ has quit [Ping timeout: 260 seconds]
rolha_ has joined #crystal-lang
rolha__ has joined #crystal-lang
rolha has quit [Ping timeout: 244 seconds]
rolha has joined #crystal-lang
rolha___ has joined #crystal-lang
rolha_ has quit [Ping timeout: 244 seconds]
rolha__ has quit [Ping timeout: 260 seconds]
sdogruyol has quit [Quit: Connection closed for inactivity]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
rocx has joined #crystal-lang
ql6wlld has quit [Quit: WeeChat 1.4]
Philpax has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
broz has joined #crystal-lang
Ven has joined #crystal-lang
Ven has quit [Client Quit]
rolha has quit [Remote host closed the connection]
rocx has quit [Remote host closed the connection]
rolha has joined #crystal-lang
<Rinkanazu>
Hey guys, i wrote an mime type lib. While it still needs some work (and the lib just just a few types) i'd love to get some feedback on the code.
<BlaXpirit>
Rinkanazu, I don't see much use for it
<BlaXpirit>
use libmagic or its database
pawnbox has joined #crystal-lang
<rocx>
'ey. question about the syntax here. what's with the |blocks|? i notice it when dealing with iterators and that it's also from ruby. but what exactly do those do in the language?
<BlaXpirit>
rocx, do you mean { } or | |
<BlaXpirit>
{...} (same as do...end) is for passing code blocks, | | in them is to specify arguments
<rocx>
right so eg. `puts posts.each { |p| ... }`
<BlaXpirit>
rocx, well that probably doesn't do what you're thinking
<NieaU7>
Hi all. I am using the http/client to access a https API for imgur, but I am getting a weird result where a exception occurs with the message of "unexpected end of http response"
<NieaU7>
the weird thing is that I am able to parse many requests perfectly fine before this happens, and it happens at the same spot each time on a specific request
<BlaXpirit>
NieaU7, I hear you but what can I do?
<NieaU7>
the response object from the get call is also nil, so I don't know how to specifically tell what the server is sending back to cause such an error
<NieaU7>
i was wondering if anyone knew a way to debug this
<NieaU7>
im willing to release the short script to reproduce it
kulelu88 has left #crystal-lang ["Leaving"]
TheLemonMan has joined #crystal-lang
<jeromegn>
it sounds like an issue with SSL
Ven has joined #crystal-lang
<NieaU7>
I am creating a reusable client via uri = URI.parse "https://api.imgur.com/"; client = HTTP::Client.new uri. I wonder if that has anything to do with it
<NieaU7>
well that seems to be it jeromegn
<NieaU7>
i just changed all my calls from client.get(..) (reusable client created via HTTP::Client.new) to HTTP::Client.get calls and I am not getting the exception any more
<jeromegn>
need to figure out what kind of SSL that host wants
<NieaU7>
well the part that I find weird is that I can do upwards of 20+ requests fine before the error occurs. unless the ssl connection closed or expired or something somehow
<jeromegn>
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
<jeromegn>
oh, weird.
rolha has joined #crystal-lang
<NieaU7>
anyways thanks jeromegn for the help. seems to be working fine now, although I still don't know the cause and if it is imgurs side or crystals side which caused the problem
rolha has quit [Client Quit]
sp4rrow has joined #crystal-lang
<jhass>
NieaU7: probably crystal's, you could try if it reproduces under mitmproxy
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sp4rrow has quit [Ping timeout: 276 seconds]
sp4rrow has joined #crystal-lang
broz has quit [Remote host closed the connection]
broz has joined #crystal-lang
_whitelogger has joined #crystal-lang
broz has quit [Remote host closed the connection]
broz has joined #crystal-lang
NieaU7 has quit [Quit: leaving]
Rinkanazu has quit [Read error: Connection reset by peer]
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
sp4rrow has quit [Quit: Textual]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
pawnbox has quit [Remote host closed the connection]
soveran has quit [Remote host closed the connection]