Coder Social home page Coder Social logo

Comments (7)

Bobris avatar Bobris commented on July 21, 2024

Hi,

This is actually not really part of official Owin standart, so it would be nice is you would add it if you need it :-)
I think all changes should be limited to https://github.com/Bobris/Nowin/blob/master/Nowin/OwinServerFactory.cs
and
https://github.com/Bobris/Nowin/blob/master/Nowin/OwinKeys.cs

from nowin.

pysco68 avatar pysco68 commented on July 21, 2024

I'd really like to give this a try (or even better implement server.OnDispose as they are mentioned in the official specification: https://github.com/owin/owin/blob/master/CommonKeys.md). I've looked at the code for some while now, and I struggle a bit to find the right place(s) to put that in.

My question: In my understanding the CancellationToken should be reachable via both IAppBuilder.Properties and the request environment. Is this a correct interpretation of the specification?

from nowin.

Bobris avatar Bobris commented on July 21, 2024

It could be in that capabilities dictionary. You get them in each request, but I don't think it should be usefull there for anything (https://github.com/Bobris/Nowin/blob/master/Nowin/OwinEnvironment.Generated.tt#L29), you already have owin.CallCanceled

from nowin.

Bobris avatar Bobris commented on July 21, 2024

And how to find out that server is disposing just subscribe in https://github.com/Bobris/Nowin/blob/master/Nowin/OwinServerFactory.cs#L79

from nowin.

serialseb avatar serialseb commented on July 21, 2024

server.OnInit and server.OnDispose have been standardized. The microsoft key is mentioned as a backward compatibility thing. See owin/owin#27

from nowin.

Bobris avatar Bobris commented on July 21, 2024

@serialseb Problem is that Nowin is just server not host or builder, so I am no sure to which Dictionary I should place this (in per request it would be for sure useless. If you know about some sample implementation I could learn from how to do it, I am also interested.

from nowin.

serialseb avatar serialseb commented on July 21, 2024

startup properties exist during wireup (if you support BuildFunc), and contain all the common keys "available at startup", as per CommonKeys. The env contains startup keys and the http request associated keys.

In other words, anything that ought to be exposed as a startup key ought to be in its own dictionary, and any key per request / response ought to be in the env dictionary, which contains all the startup keys.

The upcoming 1.0.1 spec will clarify those things.

from nowin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.