Legacy-Research-Engine icon indicating copy to clipboard operation
Legacy-Research-Engine copied to clipboard

Skip pages with basic http auth during importing

Open dionysio opened this issue 9 years ago • 6 comments

When you encounter sites requiring basic http authentication during the import the whole process stops and waits. So maybe just skip these pages altogether.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

dionysio avatar Jan 17 '17 14:01 dionysio

Thanks @dionysio for your request.

Do you have an idea on how to easily identify them?

blackforestboi avatar Jan 17 '17 14:01 blackforestboi

You could check for 401 Unauthorized status first (and possibly WWW-Authenticate header for basic/digest). Or maybe only accept 20x codes.

dionysio avatar Jan 17 '17 16:01 dionysio

I wonder, why they are actually called then, because we already filter out all requests that are !=200

if (xhttp.readyState == 4 && xhttp.status == 200)

blackforestboi avatar Jan 17 '17 16:01 blackforestboi

What do you mean with:

Or maybe only accept 20x codes.

blackforestboi avatar Jan 17 '17 16:01 blackforestboi

if (xhttp.readyState == 4 && xhttp.status == 200)

The line you've posted is exactly what I meant - that it should only process responses that have 200 status... so I'm not sure why they actually pass that.

dionysio avatar Jan 17 '17 16:01 dionysio

@dionysio @oliversauter it might be that the code drops that 401 and don't process it but browser just shows login window which block further processing?

robert-matusewicz avatar Mar 17 '17 07:03 robert-matusewicz