-
Notifications
You must be signed in to change notification settings - Fork 41
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
Sending HTTP headers #36
Comments
Could you please post the code that you have changed? |
Sure. |
I've created a diff: The ASP.NET version has been changed and tested in case of GET requests only. I don't know how the library behaves in other environments and other VERBs. This is the reason I send just a diff and not a pull request. |
Can you explain how I can reproduce the original problem? I rather not pollute the generic |
I've run two test cases. In both cases I applied a disk based web handler pointing to the same location. My minisite hosted a page having a link to a LibreOffice odt file this way: doc2 I clicked the link to start editing in LibreOffice. Specialities of the two test cases:
I've captured the communication via Fiddler. Line 5 is the result of the GET request sending content type of text/html. Line 3, 4 are propfinds also with bad content type. Line 5 shows the right content type here (while propfinds are still wrong as I haven't modified the respective handler). |
When doing a PoC for MSOffice/LibreOffice editing feature while putting the documents on a WebDAV address pointed by a href links I noticed that the HTTP headers are not sent in case of GET requests.
NWebDav is hosted on ASP.NET (not Core).
To temporarily overcome the issue I had to add a flush method that flushes the content to the response before starting to write the actual content. The flush is called before the "if (!head) await CopyToAsync" statement in GetAndHeadHandler.cs.
I don't know if something similar is required for ASP.NET Core, HttpListener and for other HTTP verbs.
The text was updated successfully, but these errors were encountered: