[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[McV #LQX-280027]: IOUtil.getInputStream request

This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.


  • Subject: [McV #LQX-280027]: IOUtil.getInputStream request
  • Date: Mon, 30 Nov 2009 09:54:49 -0700


> I just created a simple test for this and I do see the 302 code (and 301 
> using a simple test webpage) using 
>huc.getResponseCode().  It looks like in this particular case (UW Wireless 
>network) simply checking for 

In my test I never saw the redirect. Not sure what your server is doing that is 
different. I'll double check my test.


>huc.getResponseCode() == 30x and throwing an exception would work... 

I think that might be OK to do without breaking anything.


>Also, if you are seeing HTTP 200s, using 
>huc.setFollowRedirects(false) ought to prevent the redirect from being 
>followed.
> 


But then we would be missing valid redirects. 

-Jeff


Ticket Details
===================
Ticket ID: LQX-280027
Department: Support McV
Priority: Normal
Status: Open