Skip to content

Minimal download test using CURL #393

Description

@stephen-soltesz
read MACHINE SERVER_URL <<< $( \
    curl --silent https://locate.measurementlab.net/v2/nearest/ndt/ndt7 \
      | jq -r '.results[0].machine,.results[0].urls."wss:///ndt/v7/download"' ) 
                                                                                
# Fix url for curl.                                                             
SERVER_URL=${SERVER_URL/wss/https}                                              
                                                                                
echo "NDT Download to $MACHINE"
curl --no-buffer \
    --max-time 12 \
    --header "Sec-WebSocket-Protocol: net.measurementlab.ndt.v7" \
    --header "Connection: Upgrade" \
    --header "Upgrade: websocket" \
    --header "Host: ndt-$MACHINE" \
    --header "Origin: https://ndt-$MACHINE" \
    --header "Sec-WebSocket-Version: 13" \
    --header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
    ${SERVER_URL} > /dev/null || : # ignore timeouts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions