Plumbing in support to be a portable web application #494

Closed
wants to merge 22 commits into from

3 participants

@loudej

Uses OWIN server abstractions

@samandmoore samandmoore and 1 other commented on an outdated diff May 19, 2012
JabbR/Startup.cs
+ {
+ 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);

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

@loudej
loudej added a note May 20, 2012

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 May 18, 2012
@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 May 28, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment