Bug 44462 - AndroidClientHandler throws InvalidOperationException when receiving 304 (Not-Modified)
Summary: AndroidClientHandler throws InvalidOperationException when receiving 304 (Not...
Status: RESOLVED NORESPONSE
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 7.0 (C8)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2016-09-18 12:49 UTC by Avidan Chen
Modified: 2017-08-23 20:45 UTC (History)
3 users (show)

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

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.

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.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description Avidan Chen 2016-09-18 12:49:08 UTC
For some reason, when using AndroidClientHandler, and including an "If-Modified-Since" header (as a deliberate intention to save on bandwidth), I am getting an InvalidOperationException (if the resource indeed hasn't changed) with the message: "HTTP Redirection status code NotModified (304) not supported". 

I except to just get a response of 304 without any exceptions.
Comment 1 Avidan Chen 2016-09-18 12:50:53 UTC
except = expect
Comment 2 John Miller [MSFT] 2017-06-26 15:28:37 UTC
Hi Avidan,

Thank you for taking the time to submit the bug. We are unable to reproduce this issue. Please attach a reproduction to the bug by starting with a clean Xamarin.Android project and adding just the code necessary to demonstrate the issue. Please also include your complete version information from Visual Studio -> Help -> About Visual Studio -> Copy Information. 

## Additional Information

AndroidClientHandler does mention that "Some HttpClient features/options are not available" and I wonder if this is relevant for an issue like this. 
https://developer.xamarin.com/guides/android/application_fundamentals/http-stack/
Comment 3 Cody Beyer (MSFT) 2017-08-23 20:45:10 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!