People
Repo info
Activity
  • 01:26
    bradleybeddoes commented #14
  • 00:55
    bradleybeddoes commented #55
  • Dec 21 20:37

    smangelsdorf on refine-test-helpers

    (compare)

  • Dec 21 20:37

    smangelsdorf on master

    Remove lifetime from TestRespon… Favour direct access over TestS… Merge pull request #75 from got… (compare)

  • Dec 21 20:37
    smangelsdorf closed #75
  • Dec 21 19:04
    nyarly commented #73
  • Dec 21 18:36
    richardanaya commented #55
  • Dec 21 11:57
    smangelsdorf commented #73
  • Dec 21 11:53
    smangelsdorf commented #74
  • Dec 21 05:34
    bradleybeddoes commented #70
  • Dec 21 05:22

    bradleybeddoes on test-helpers-and-new-tree

    Merge branch 'router-builder' i… Support sub-router delegation i… (compare)

  • Dec 20 23:03
    coveralls commented #75
  • Dec 20 22:34
    bradleybeddoes synchronize #75
  • Dec 20 22:34

    bradleybeddoes on refine-test-helpers

    Favour direct access over TestS… (compare)

  • Dec 20 11:55
    smangelsdorf commented #75
  • Dec 20 11:50
    smangelsdorf labeled #75
  • Dec 20 11:50
    smangelsdorf labeled #75
  • Dec 20 11:50
    smangelsdorf milestoned #75
  • Dec 20 11:31
    coveralls commented #75
  • Dec 20 11:06
    bradleybeddoes assigned #75
Judson Lester
@nyarly
[2017-12-18 04:39:30.395737563][gotham::handler][INFO][REQUEST][7274a1ce-6a49-4024-b4b3-9e09836daec8][GET][/]
thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', /checkout/src/libcore/option.rs:335:20
Bradley Beddoes
@bradleybeddoes
@IntrepidPig I've been using that very successfully thus far, however diesel isn't future aware as of now, so I am still considering what i'll do to work around that
Judson Lester
@nyarly
But that's also after converting own printlns to info! and debug! - none of which appear.
IntrepidPig
@IntrepidPig
@bradleybeddoes Thanks that looks very useful!
Judson Lester
@nyarly
Okay, one sec...
Bradley Beddoes
@bradleybeddoes
@nyarly did you push this code, i'll take a look
Judson Lester
@nyarly
@bradleybeddoes Pushed.
Bradley Beddoes
@bradleybeddoes
odd
you should be seeing all kinds of output, including hyper
Bradley Beddoes
@bradleybeddoes
ok finally got your code running @nyarly
the pcks12 thing took me back, had to go and look that up in openssl land, has been a while
let me poke around a bit here....
Bradley Beddoes
@bradleybeddoes
ok @nyarly ended up being a simple one
I overlooked that your code tried to get your session struct direct from state
I still get a 500, but this seems to be expected from the quick look I had (given I don't have the right config in place it seems)
$ curl -k -v https://127.0.0.1:8080/
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
* WARNING: disabling hostname validation also disables SNI.
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate: Internet Widgits Pty Ltd
> GET / HTTP/1.1
> Host: 127.0.0.1:8080
> User-Agent: curl/7.54.1
> Accept: */*
>
< HTTP/1.1 500 Internal Server Error
< Content-Type: text/plain; charset=utf-8
< Set-Cookie: _gotham_session=h0FZIHqMjF52RaExN72-qYCLKaox_SV6v8pMhroJOoCAXVsC-oBIPCF1WzuWETzGSQMuDtQMxGSRC3RY8yKnpw; HttpOnly; secure; SameSite=lax
< X-Runtime-Microseconds: 568
< Transfer-Encoding: chunked
< Date: Mon, 18 Dec 2017 06:02:35 GMT
<
* Connection #0 to host 127.0.0.1 left intact
relative URL without a base%
hth
Judson Lester
@nyarly
What's the difference between state.borrow and StateData::borrow_from?
Judson Lester
@nyarly
That does seem to be the ticket. On to the next problem :)
Thanks very much for the help.
Bradley Beddoes
@bradleybeddoes
SessionData is the type the Session middleware puts into state so that is what must be retrieved.
matrixbot
@matrixbot
ChristophWurst Hey! Is there an easy way to get hold of a tokio handle inside a Gotham handler? Do I have to write a middleware for that or is that already integrated somehow? I'm trying to stream incoming data to another server
Judson Lester
@nyarly
I'm explicit about it one of those issues, but I'd be interested in further contributions, especially on the issues I just filed.
Really enjoying working with Gotham so far.
Bradley Beddoes
@bradleybeddoes
ChristophWurst: the tokio handle is something @smangelsdorf and I have been talking about adding to state
out of interest what is the use case?
Bradley Beddoes
@bradleybeddoes
thanks @nyarly, I've had a quick read, will come back to them later on
matrixbot
@matrixbot
ChristophWurst Bradley Beddoes (Gitter): I want to send a new hyper request within the Gotham handler, which needs a handle for construction
ChristophWurst but basically you'll need it for anything that should perform async actions on the same event loop I guess
Bradley Beddoes
@bradleybeddoes
indeed, just wondering how you intended to use it
something we need to make happen at this point, just have to slot in the work
matrixbot
@matrixbot
ChristophWurst would make sense to obtain it through the state
Bradley Beddoes
@bradleybeddoes
yeah, that is what @smangelsdorf and I came to the conclusion of as well
if you want an X, get it from state.
^ that thinking is what allowed us to drop Request as it appeared in the 0.1 API.
matrixbot
@matrixbot
ChristophWurst it should suffice to get a reference, at least in the case of hyper: https://docs.rs/hyper/0.11.9/hyper/client/struct.Client.html#method.new
ChristophWurst I'd be happy to dig into the Gotham code and see how we could add that
ChristophWurst unless you're already working on that
Bradley Beddoes
@bradleybeddoes
no work towards it yet that I am aware of, feel free to dig in :+1:
matrixbot
@matrixbot
ChristophWurst perfect!
ChristophWurst btw, what are your plans for the next Gotham release?
ChristophWurst e.g. will there be a 0.2 with the new router API?
ChristophWurst (I've used it for a few test projects and it works really well)
Bradley Beddoes
@bradleybeddoes
I think that will make sense
we always thought the new router api would be a good time to cut 0.2
likely in the early part of 2018
btw, this might help you get started with storing the handle: https://github.com/gotham-rs/gotham/blob/master/src/handler/mod.rs#L151
I'm just on my way out, will stop by in a few hours
matrixbot
@matrixbot
ChristophWurst thanks!