-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ResourceHandler - Reset Stream.Position when CanSeek #2903
Comments
Testing with 58c9585 and loading https://cefsharp.example/logo.png in either the I suspect what you are seeing is a subtle change in behaviour as part of the new
As per https://github.com/cefsharp/CefSharp/blob/master/.github/ISSUE_TEMPLATE/bug_report.md#bug-report please provide an example that reproduces the problem, and incomplete code snippet is not sufficient. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@TKGNET I asked this because I'm after an example that reproduces this issue. Your code doesn't actually do that. You are using a |
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. |
sorry for the delay in the answer @amaitland. I have prepared an example project based on the WinForms minimal example. https://github.com/jpespartero/CefSharp.MinimalExample The ImageMemorySchemeHandler implemented contains a Dictionary with in-memory images and handles an url image request to provide the Stream and MimeType in the custom implementation of the ProcessRequestAsync method. Maybe, I'm doing something wrong, but if load the image from a file in the Stream the image is displayed properly.
|
Thanks for the example 👍 You need to reset the This is a regression in Generally speaking it's best to reset |
Thanks a lot for the quick response and the solution provided! |
- Prior to version 75 the Stream.Position was set to 0 before the ResourceHandler would read the Stream. This restores that behaviour. - Minor refactor of if statement for Stream.Can seek, only override ResponseLength with Stream.Length of not already set Resolves #2903
What version of the product are you using?
Nuget 75.1.142
What architecture x86 or x64?
x64
On what operating system?
Win10
Are you using
WinForms
,WPF
orOffScreen
?WinForms
What steps will reproduce the problem?
A custom ResourceHandler implementation that provides local memory images to the browser has stopped working correctly from the version 75.1.141.
The image is not displayed in the browser, but the ResourceHandler is providing the image stream.
The same code works fine up to version 73.1.30. Note that the interface has been updated to return a CefReturnValue instead of a bool.
` public override CefReturnValue ProcessRequestAsync(IRequest request, ICallback callback){
What is the expected output? What do you see instead?
Image displayed in the browser
Please provide any additional information below.
A stack trace if available, any Exception information.
No exception is shown
Does the cef log provide any relevant information?
No
The text was updated successfully, but these errors were encountered: