Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Plumbing in support to be a portable web application #494

Closed
wants to merge 22 commits into from

4 participants

@loudej

Uses OWIN server abstractions

JabbR/Startup.cs
((48 lines not shown))
+ {
+ ExecutionContext.SuppressFlow();
+ ThreadPool.QueueUserWorkItem(
+ _ =>
+ {
+ var context = ExecutionContext.Capture();
+ app(
+ env,
+ (status, headers, body) => result(
+ status,
+ headers,
+ (write, flush, end, cancellationToken) => ExecutionContext.Run(
+ context.CreateCopy(),
+ __ => body(write, flush, end, cancellationToken),
+ null)),
+ fault);
@samandmoore Collaborator

this is really difficult to read, is there a better way to format this?

@loudej
loudej added a note

I removed it altogether

that particular middleware was just being defensive - in case the http server didn't provide a new ExecutionContext per http connection. In the end it probably makes more sense to require the http server handlers for firefly and gate to ensure there's a new execution context that "sticks" to each of the calls coming in for a request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
davidfowl and others added some commits
@davidfowl davidfowl Changed cert name to jabbr. e823595
@davidfowl davidfowl Detect https for signalr traffic by requesting an image on the site v…
…ia https.

If it fails, don't bother changing the url. Otherwise use the https url.
ed6b5db
@davidfowl davidfowl Remove detection logic for https since it's blocked because of cors. e8a4931
@davidfowl davidfowl Made youtube embed urls use https 61b3f2a
@davidfowl davidfowl Make user voice content provider work with https. 6f92b46
@davidfowl davidfowl Use https for twitter profile images. 70fed9f
@davidfowl davidfowl Ah forgot the jsonp call for twitter :). 8c6a470
@davidfowl davidfowl Added proxying for images and imgur.
- Added very basic proxy handler and made imgur and images.
087f9af
@davidfowl davidfowl Changed proxy urls from Proxy.ashx to proxy so no implementation is a…
…ssumed.

- Changed the image content providers appropriately.
fbd7761
@izevaka izevaka Moved common API response code into extension methods.
- Added QueryString extension method that tokenizes URL querystring
  parameters.
- Added TryGetAndConvert method that gets a querystring parameter and tries
  to convert it to a specified type
- Created a whole bunch of extension methods to return success and error
  responses.
72303e6
@izevaka izevaka Refactored UriExtensions to be a non-static class.
- Created a QueryString class that wraps up extracting and converting query
  string parameters.
fd617dc
@izevaka izevaka Removed common setup from unit test constructors. 59175e6
@izevaka izevaka Cleaned up variable names for consistency sake.
- Changed _QueryStringCollection local variable to queryStringCollection.
- Changed _QueryStringDictionary member variable to _queryStringDictionary.
f071d49
@davidfowl davidfowl Removed dead code. 571978d
@davidfowl davidfowl Remove dead code from chat.js that tries to detect https since it can…
…'t work.
e3b3c1e
@loudej loudej Shifting from ASP.NET hosting to all hosts via OWIN
Switching SignalR and WebApi host binding to OWIN adapters
Adding packages for Gate middleware and ASP.NET support
Adds TransitionalGlue.cs to minimize code impact

Conflicts:

	JabbR/packages.config
d82afa6
@loudej loudej Patching in the components that do request work
Use(Sanity) provides early warning of incorrect call patterns
UseHomePage calls a simplistic default.aspx renderer
UseStatic returns filesystem objects for requests
UseSignalRHubs dispatches requests to signalr
RunHttpServer dispatches to WebAPI constrollers
6e202f5
@loudej loudej Updated to fix ninject scope
Adds a scope token object to execution context
NewExecutionContext middleware forces an exec context per request
UseRequestScope middleware adds and removes scope token
Path /Default.aspx is also added as a home page url
253b69c
@loudej loudej Refactoring for clarity and adding comments
A few concerns, like setting the ASP.NET current directory, and
having a distinct ExecutionContext per request, have been moved
to their respective host handlers
dbfb1e5
@loudej loudej Fixing merge conflict between RouteMagic and Owin reference 3f69890
@loudej

This will take some refactoring at other levels before a pull request to jabbr is practical.

Thanks for the feedback though!

@loudej loudej closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 19, 2012
  1. @davidfowl
  2. @davidfowl
  3. @davidfowl

    Changed cert name to jabbr.

    davidfowl authored
  4. @davidfowl

    Detect https for signalr traffic by requesting an image on the site v…

    davidfowl authored
    …ia https.
    
    If it fails, don't bother changing the url. Otherwise use the https url.
  5. @davidfowl
  6. @davidfowl
  7. @davidfowl
  8. @davidfowl
  9. @davidfowl
  10. @davidfowl

    Added proxying for images and imgur.

    davidfowl authored
    - Added very basic proxy handler and made imgur and images.
  11. @davidfowl

    Changed proxy urls from Proxy.ashx to proxy so no implementation is a…

    davidfowl authored
    …ssumed.
    
    - Changed the image content providers appropriately.
  12. @izevaka @davidfowl

    Moved common API response code into extension methods.

    izevaka authored davidfowl committed
    - Added QueryString extension method that tokenizes URL querystring
      parameters.
    - Added TryGetAndConvert method that gets a querystring parameter and tries
      to convert it to a specified type
    - Created a whole bunch of extension methods to return success and error
      responses.
  13. @izevaka @davidfowl

    Refactored UriExtensions to be a non-static class.

    izevaka authored davidfowl committed
    - Created a QueryString class that wraps up extracting and converting query
      string parameters.
  14. @izevaka @davidfowl

    Removed common setup from unit test constructors.

    izevaka authored davidfowl committed
  15. @izevaka @davidfowl

    Cleaned up variable names for consistency sake.

    izevaka authored davidfowl committed
    - Changed _QueryStringCollection local variable to queryStringCollection.
    - Changed _QueryStringDictionary member variable to _queryStringDictionary.
Commits on May 20, 2012
  1. @davidfowl

    Removed dead code.

    davidfowl authored
  2. @davidfowl
  3. @loudej

    Shifting from ASP.NET hosting to all hosts via OWIN

    loudej authored
    Switching SignalR and WebApi host binding to OWIN adapters
    Adding packages for Gate middleware and ASP.NET support
    Adds TransitionalGlue.cs to minimize code impact
    
    Conflicts:
    
    	JabbR/packages.config
  4. @loudej

    Patching in the components that do request work

    loudej authored
    Use(Sanity) provides early warning of incorrect call patterns
    UseHomePage calls a simplistic default.aspx renderer
    UseStatic returns filesystem objects for requests
    UseSignalRHubs dispatches requests to signalr
    RunHttpServer dispatches to WebAPI constrollers
  5. @loudej

    Updated to fix ninject scope

    loudej authored
    Adds a scope token object to execution context
    NewExecutionContext middleware forces an exec context per request
    UseRequestScope middleware adds and removes scope token
    Path /Default.aspx is also added as a home page url
  6. @loudej

    Refactoring for clarity and adding comments

    loudej authored
    A few concerns, like setting the ASP.NET current directory, and
    having a distinct ExecutionContext per request, have been moved
    to their respective host handlers
  7. @loudej
Something went wrong with that request. Please try again.