Closed Bug 125768 Opened 23 years ago Closed 21 years ago

loading an image via javascript is considered complete if server responds with 401 auth required

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: bryan.thale, Assigned: pavlov)

References

Details

Attachments

(1 file)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.8) Gecko/20020204
BuildID:    2002020406

Sorry, I don't have a publicly accessible test page to demonstrate, but I've
attached my simple example test page below.

What I'm trying to do is load an image using JavaScript from an area of my site
that requires password access.  When it receives the 401 Auth Required response
from the server, Mozilla seems to consider the request complete and does not
prompt for the user ID and password and re-issue the request.

Using Netscape 4.78 and MSIE 5.5, I can see two access attempts in the server
logs, the first with 401 and the second with a 200 after I provide my user ID
and Password.  No matter how long I wait when using Mozilla, I only ever see
just the first request that the server rejects with a 401.

Again, with Netscape and MSIE, the complete property of the Image object is not
set to true until the request recieves a final response such as 200 or 404.  The
401 response does not complete the request.  With Mozilla, Image.complete seems
to be set to true upon receipt of the 401 response from the server.

Reproducible: Always
Steps to Reproduce:
1.Start the browser
2.Load the test page
3.Click OK to the alert boxes that display the state of the Image.complete property
4.Examine the server logs

Actual Results:  1. An alert box with theImage.complete=false appears
2. An alert box with theImage.complete=true appears

Server log contains a single entry showing the request receiving a 401 response.

Expected Results:  1. An alert box with theImage.complete=false appears
2. The login box appears and promtps the user for ID and Password
3. An alert box with theImage.complete=true appears

Server log contains two entries, the first with 401 response and the second with
a 200 response.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Hardware: PC → All
Component: ImageLib → Image: Layout
this is due to the loadgroup being empty when the image is loaded from
javascript and us not being able to pass along the interfacerequestor.. there
are numerous other problems caused by the loadgroup being empty...
Target Milestone: --- → mozilla1.1alpha
http://www.viewline.net/ 
Mozilla doesn't acknowledge login information request by the ASP and this
generate a 401.2 error instead of 401.1
-> i submit a new bug: bug 189170. mark it as DUPEME. mark it as blocking bug
57529 Bug 134103 bug and this. sorry for the spam.
marking this blocking 61681
Blocks: 61681
Depends on: 189170
http://www.viewline.net/ 
Mozilla doesn't acknowledge login information request by the ASP and this
generate a 401.2 error instead of 401.1
-> i submit a new bug. mark it as DUPEME. mark it as blocking bug 57529 Bug
134103 and this. sorry for the spam.
No longer depends on: 189170
retargeting
Target Milestone: mozilla1.1alpha → Future
I just tried this (setting the image src to a page that I know will return 401)
and I get a prompt asking me for a username and password.  Is this still a
problem?  It may be that the image-loading-from-content changes fixed this....
(In reply to comment #6)
> I just tried this (setting the image src to a page that I know will return 401)
> and I get a prompt asking me for a username and password.  Is this still a
> problem?  It may be that the image-loading-from-content changes fixed this....

I think you are correct.  This problem seems to have been resolved at some point
as mozilla 1.4.1 works correctly, retrying the get of the image after requesting
the user ID and password.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Ah, ok.  That's the right time frame for this to have gotten fixed by bug 83774,
yes.
Depends on: 83774
Product: Core → Core Graveyard
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: