Bug 52521 - AndroidClientHandler does not support 304 redirect
Summary: AndroidClientHandler does not support 304 redirect
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: BCL Class Libraries (show other bugs)
Version: 7.1 (C9)
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Habersack
URL:
Depends on:
Blocks:
 
Reported: 2017-02-15 11:53 UTC by Tomasz Cielecki
Modified: 2017-03-14 14:13 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Tomasz Cielecki 2017-02-15 11:53:29 UTC
Say I want to download an e-tagged Blob from Azure Blob storage, usually I would do that by setting a If-None-Match header with the e-tag I currently have (other headers are supported too: https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Specifying-Conditional-Headers-for-Blob-Service-Operations?redirectedfrom=MSDN).

In case I already have the latest blob version I would get a 304 (Not Modified) status code, otherwise a 200 with the new file etc.

The problem here is that the AndroidClientHandler does not support the 304 Status Code and throws an InvalidOperationException

https://github.com/xamarin/xamarin-android/blob/master/src/Mono.Android/Xamarin.Android.Net/AndroidClientHandler.cs#L453

Would really love to be able to use this handler for Azure Blobs.
Comment 1 Marek Habersack 2017-03-14 13:13:53 UTC
PR opened https://github.com/xamarin/xamarin-android/pull/487
Comment 2 Marek Habersack 2017-03-14 14:10:14 UTC
Fixed in

  xamarin-android/master, commit c68f79ad387d8254ec2f29c4e8eb00ec8ea1eb1e
Comment 3 Marek Habersack 2017-03-14 14:13:41 UTC
Fixed in

   monodroid/master, commit fc64987a5dac4c0bd5e861720c29fba093437f05

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.


Create a new report for Bug 52521 on Developer Community or GitHub if you have new information to add and do not yet see a matching report.

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments


Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Related Links: