Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4623722

performance hit for Basic Authentication

    Details

    • Subcomponent:
    • Resolved In Build:
      04
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        This bug can be seen with 1.4.0_91.

        with the following BasicAuthentication setup on your server:

           "realm"
           /533837 -------/dir1/file1.txt
                     |
                      ----/dir2/file2.txt

        request the following:
          /533837/dir1/file1.txt
          /533837/dir2/file2.txt
           533837/dir1/file1.txt
          /533837/dir2/file2.txt


        Output from snoop:
        -----------------------
          liam -> vimes HTTP GET /533837/dir1/file1.txt HTTP/1.1
          vimes -> liam HTTP HTTP/1.1 401 Authorization Required
          liam -> vimes HTTP GET /533837/dir1/file1.txt HTTP/1.1
          vimes -> liam HTTP HTTP/1.1 200 OK
          liam -> vimes HTTP GET /533837/dir2/file2.txt HTTP/1.1
          vimes -> liam HTTP HTTP/1.1 401 Authorization Required
          liam -> vimes HTTP GET /533837/dir2/file2.txt HTTP/1.1
          vimes -> liam HTTP HTTP/1.1 200 OK
          liam -> vimes HTTP GET /533837/dir1/file1.txt HTTP/1.1
          vimes -> liam HTTP HTTP/1.1 200 OK
          liam -> vimes HTTP GET /533837/dir2/file2.txt HTTP/1.1 <<-- (a)
          vimes -> liam HTTP HTTP/1.1 401 Authorization Required
          liam -> vimes HTTP GET /533837/dir2/file2.txt HTTP/1.1
          vimes -> liam HTTP HTTP/1.1 200 OK
        -----------------------

        From the above output it can be seen that the second time liam requests
        file2.txt (a), that the server returns an 'Authorization Required' responce
        even though we have previously been authenticated for that URL. The subquent
        HTTP GET /533837/dir2/file2.txt HTTP/1.1 includes the correct Authenticate
        header, which is got from the cache.

        This extra level of indirection is not necessary and may lead to poor
        performance for HTTP Clients that request alot of resources from the server.

        ###@###.### 2002-01-15
        ------------------------------------------------------

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  michaelm Michael McMahon
                  Reporter:
                  chegar Chris Hegarty
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: