38 Commits

Author SHA1 Message Date
amaitland 9df1bc132c Add RegisterResourceHandler and UnRegisterResourceHandler to simplify using the DefaultResourceHandlerFactory 2016-12-08 22:14:09 +10:00
amaitland 153296df63 Add ErrorCode to ResourceHandler - can now set the IResponse.ErrorCode without having to manually implement IResourceHandler 2016-06-22 11:52:15 +10:00
amaitland 04d2a8ede8 Add ResourceHandler.FromFilePath method that takes in a MimeType
Make ResourceHandler.FromFileName obsolete
2016-06-16 15:16:30 +10:00
amaitland 9d5abddc9a Fix typos 2016-06-01 16:30:34 +10:00
amaitland e97fe18165 ResourceHandler - Add AutoDisposeStream (Stream will be disposed when the ResourceHandler is Disposed) 2016-06-01 15:09:58 +10:00
amaitland 3061becb3f IResourceHandler now implements IDisposable - you can cleanup and resources when the handler is disposed 2016-05-26 07:28:19 +10:00
amaitland 560fa2b867 Improve ResourceHandler documentation, add a minor simplification and update the FlashResourceHandler example to demo how simple it is to use a ResourceHandler when extending FlashResourceHandler 2016-04-15 16:25:06 +10:00
amaitland 12f42331dc Resolves #1592 - Expose all methods of CefResourceHandler
Previously we were passing in the frame, request wrappers which hadn't been used, so just keep things simple and remove the code.
Current users should extend ResourceHandler instead of IResourceHandler and add the override keyword
TODO: Deal with setting bytesRead property - currently using Stream.Length which won't work for every stream type
2016-02-18 16:44:51 +10:00
amaitland bae3c28e92 Update copyright to 2016 2016-01-11 14:11:30 +10:00
Atvaark b04ccbb269 Add missing comments 2015-11-04 13:10:00 +10:00
Alex Maitland 042f873975 Resolve issue with loging plugin diagnostic page - MimeType was null which crashed unexpectedly
Added validation so that MimeType is required or exception throw
Remove some of the method overloads and replace with default params on the main methods
2015-08-09 12:26:00 +10:00
amaitland 2f863b5c9b Make MimeType directly settable - think that's the last change required to make it flexible 2015-07-29 21:14:15 +10:00
amaitland 9225da0a26 Make constructor public again, guess it's possible that you would need an empty ResourceHandler with a different StatusCode for example 2015-07-29 21:12:29 +10:00
amaitland 88b02ba904 Add ResourceHandlerType to deal with Files differently, use the underlying CefStreamReader::CreateForFile implementation 2015-07-29 20:49:29 +10:00
amaitland 864f9ea7a2 Rename GetResponseHeaders to GetResponse 2015-06-15 23:07:02 +10:00
amaitland afbed86524 First draft of what is hopefully the final rewrite of ResourceHandler/SchemeHandler
This will built but won't run as CefResponseWrapper has not yet been implemented.
2015-06-15 21:03:25 +10:00
amaitland c193020c72 Change public API to use Continue and Cancel methods - callback is then somewhat more consistent with other callback wrappers 2015-06-05 12:17:12 +10:00
amaitland c8d73574da Add cancel param to ProcessRequestCallback - previously only able to call the Continue() method on the callback 2015-06-05 12:12:33 +10:00
Bill Tutt 1df0d648a8 Don't create a task for MemoryStreams, and some more Resharper Cleanups. 2015-05-28 22:14:34 -04:00
amaitland 2983bf7383 Change ContentLength to be a long (int64)
Set ContentLength in ResourceHandler when using a MemoryStream
2015-05-27 18:01:17 +10:00
amaitland 187b255730 Change ResourceHandler to use explicit IResourceHandler interface implementation
Add some extra spacing and fix up a comment
2015-05-27 17:17:29 +10:00
amaitland 9c7bf2e930 Change ResourceHandler to IResourceHandler
Add StatusText
2015-05-27 17:11:52 +10:00
rassilon 7128e40fd1 It's time for copyright updates again. Yay!
Throw in a couple of tab containing files for good measure.
Evil tabs, evil I say.
2015-04-25 02:45:21 -04:00
James 44fa52cc96 Update ResourceHandler.cs
Missing mime type for svg added
2015-03-05 14:57:27 +08:00
rassilon a300631954 Do a little cleaning up of StreamAdapter to more effeciently deal with MemoryStreams, and add lame header to ResourceHandler usage in CefExample.cs.
Additionally, allocate Headers NameValueCollection in constructor.
2015-03-02 19:02:37 -05:00
MantisCore 1cc6ab2f5e Changed the ResourceHandler constructor overload taking a stream to a method FromStream instead to make it more consistent with existing methods. 2014-12-27 12:22:16 +01:00
MantisCore eabfcff3fe Added constructor overloads to ResourceHandler to enable supplying an existing resource stream. 2014-12-27 11:56:54 +01:00
amaitland f805f50544 Save the internal byte array of MemoryStream from being expanded unnecessarily as per https://github.com/cefsharp/CefSharp/pull/691#issuecomment-67116871 2014-12-16 16:19:51 +10:00
amaitland e235cf1598 Spelling mistakes 2014-12-16 12:35:03 +10:00
amaitland 85024f2fb0 Add ability to specify FromText Encoding and Preamble (without a preamble then Cef will use DefaultEncoding to render the html) 2014-12-16 10:43:44 +10:00
amaitland 907cca8b53 ResourceHandler formatting change (indentation) 2014-11-25 17:29:39 +10:00
James b57fafe38d Update ResourceHandler.cs
Added override for passing in the file ext to correctly set the correct mime type
2014-11-21 12:43:29 +08:00
amaitland 757bc66122 Untabify 2014-11-18 14:33:26 +10:00
amaitland 8e9c5da0da Add basic example 2014-11-18 12:03:59 +10:00
amaitland da16b3a9bc Add FromString method for loading ResourceHandler from string 2014-11-18 12:03:59 +10:00
amaitland 30c8cf9248 Make ToHeaderMap static in SchemeHandlerWrapper (Needs to be moved to a common place in the future)
Get basic CefStreamResourceHandler compiling
Add headers and status codes to ResourceHandler
2014-11-18 12:03:59 +10:00
amaitland 85c260d07c Implement missing method in StreamAdapter
Implementation of GetResourceHandler still incomplete
2014-11-18 12:03:59 +10:00
amaitland 215f804fb5 Add GetResourceHandler to IRequestHandler interface
Simplify OnBeforeResourceLoad to only support redirect for now
2014-11-18 12:03:59 +10:00