New libcurl test for RTSP Basic authentication#9449
New libcurl test for RTSP Basic authentication#9449lminiero wants to merge 4 commits intocurl:masterfrom lminiero:master
Conversation
|
This looks like a fine start!
That's fine. The test numbers don't mean anything, they just make each test has its own unique id.
I don't see why we would want "an ugly workaround" in the test? Especially since the test doesn't run OK with it either in current master. In my mind, the point with this test case was to use it as a tool to verify that whatever fix is necessary to get RTSP + auth to work actually works. Without workarounds. |
Makes sense! I only added it to highlight what caused it to break from previous versions (where the workaround helped), and how without the workaround both still failed because of a deeper issue. I'll get rid of it shortly. |
|
There's been a month with nobody trying to actually fix these problems that this test highlights. I think we basically have two options on how to proceed in spite of no one fixing RTSP:
Thoughts? |
|
I don't have a strong opinion on either, if not that merging it (even with a disabled state) might help people be aware of pending tests that need fixing. Of course there are other places where the existence of this problem is reported, so it's not really needed I guess. Sorry if I haven't worked on a fix myself in the meanwhile, but unfortunately I'm not familiar with the curl internals, at least not at the depth fixing this problem would probably need. Should that change I'll definitely take a look. |
|
Hi, Using @lminiero's test I have this now: but I have not fixed the CURLOPT_REDIR_PROTOCOLS problem. I did:
I added the diff for 2) below. I don't see how I can propose a change to a pull request. What do you think of it? @bagder, would it be acceptable to have rtsp authentication working again, with enabled test, but accept the CURLOPT_REDIR_PROTOCOLS workaround? To me it seems of great value Below the diff for rtsp.c. @lminiero, maybe you can add it? |
Great value for whom? If we accept that hack to get RTSP auth working, then applications using other schemes suddenly unwillingly also start accepting redirects to RTSP URLs. That seems totally wrong. Not to mention that if we accept this hack, I fear that every RTSP user will be happy and satisfied and no one will work on doing the proper fix. So no, I don't think it is in the project's long-term interest to accept this work-around. |
I understand your reasoning. I'd appreciate if the test in this PR gets merged then in disabled status. It helps with trying to fix the redirect-thing
I mentioned that :) |
|
I just created #9870 which is my take on fixing this. It includes this test case, renumbered to 3100 and @janssen70's clue about the first host fields. |
As requested in #4750, this is an attempt to provide a libcurl test to address the currently broken RTSP authentication support. More precisely, this test will check Basic authentication, but in case the test is fine, a different one can be provided for Digest as well. As it is now, as expected it will break on the protocol check, since the second DESCRIBE should contain an
Authorization: Basicheader, which libcurl is not sending (the main problem that should be solved).This is the first time I work on a curl/libcurl test, so there are good chances I did something wrong or failed to comply with some assumptions or requirements: in case, I apologize in advance, and I'll gladly accept feedback on how to fix what's wrong. To make an example, I arbitrarily chose
4000as a number for the test, since I didn't know if there was a rule for the numbering.With respect to the libcurl check itself, notice that the code currently also includes the ugly workaround that until 7.78.0 still got RTSP authentication working (even though it was apparently broken already), that is:
Not sure if this should be removed in the finalized test, in case this is considered ok to merge eventually. With the snippet above as part of the code, trying this test on curl 7.78.0 succeeds:
The same test launched on master will fail instead:
Removing the workaround causes both older and newer versions of libcurl to fail the test sooner than that, with
log/stderr4000containingwhich seems in line with the discussion made in #4750.
Please let me know if this test is acceptable, or if there's any changes that should be made. Thanks!