Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Perform the HTTP request using curl 
  2. Examine the curl status return code
    Non-zero status indicates curl encountered an error, so we display this information and exit. The most common problems are “connection timeout” and “file already exists” when attempting to write the output file.
  3. Examine the HTTP response status code
    a. if return_code=200 then all is OK and the result is in the correctly named output file (from the OJ options)
    b. if return_code=303 then we have a redirect case; examine the redirection URL contained in the 'Location' header
      • if the redirect url is for CMR, then follow it and flow CMR results to the screen. Note that in this case we also clean up the empty output file created by the initial curl.
      • if the redirect url is not for CMR, then follow it with -O -J to save result with the correct EGI zip file name
    c. otherwise, any other return code indicates an error and the output file should be the xml format error info


...