[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #58257] urlwrite 403 Forbidden crashes octave
From: |
Ben Stanley |
Subject: |
[Octave-bug-tracker] [bug #58257] urlwrite 403 Forbidden crashes octave |
Date: |
Mon, 27 Apr 2020 09:42:58 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0 |
URL:
<https://savannah.gnu.org/bugs/?58257>
Summary: urlwrite 403 Forbidden crashes octave
Project: GNU Octave
Submitted by: benstanley
Submitted on: Mon 27 Apr 2020 01:42:56 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Segfault, Bus Error, etc.
Status: None
Assigned to: None
Originator Name: Ben Stanley
Originator Email:
Open/Closed: Open
Release: 6.0.90
Discussion Lock: Any
Operating System: GNU/Linux
_______________________________________________________
Details:
The following command crashes octave 6.0.1:
[f, success, message ] = urlwrite(
'https://www.nasdaq.com/api/v1/historical/amzn/stocks/2010-04-27/2020-04-27',
'/tmp/HistoricalQuotes.csv' )
Expected result:
/tmp/HistoricalQuotes.csv contains data downloaded from nasdaq.com.
Actual result:
Octave creates an empty file /tmp/HistoricalQuotes.csv
Octave never returns to the command prompt >>
CTRL-C at the command prompt has no effect
Attempting to close the octave gui window has no effect.
It is necessary to kill and re-start octave to regain control.
Please note that I am able to download many other URLs successfully with
urlwrite. This particular nasdaq URL is special. It returns error 403
Forbidden unless you set the UserAgent to empty. The following commands
successfully download the content:
wget --output-document=HistoricalQuotes.csv --user-agent=""
https://www.nasdaq.com/api/v1/historical/amzn/stocks/2010-04-27/2020-04-27
curl --output HistoricalQuotes.csv --user-agent ""
https://www.nasdaq.com/api/v1/historical/amzn/stocks/2010-04-27/2020-04-27
Removing the --user-agent option from these commands causes them to fail as
well, but at least they don't lock up.
For the moment I plan to work around this problem by using the system command
to run curl or wget as shown above. I suspect that allowing urlwrite to set
the UserAgent would also solve the problem, but I did not find a way of doing
that.
I tested octave built from source, downloaded with mercurial.
I built the latest commit on the stable branch.
Octave successfully built. Now choose from the following:
./run-octave - to run in place to test before installing
make check - to run the tests
make install - to install (PREFIX=/usr/local)
HG ID for this build is "50d83252f867"
make[2]: Leaving directory '/home/ben/octave-src/octave-7/.build'
After installing octave, I started it with the command
octave --gui
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58257>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #58257] urlwrite 403 Forbidden crashes octave,
Ben Stanley <=
- [Octave-bug-tracker] [bug #58257] urlwrite 403 Forbidden crashes octave, Rik, 2020/04/27
- [Octave-bug-tracker] [bug #58257] urlwrite 403 Forbidden crashes octave, Mike Miller, 2020/04/27
- [Octave-bug-tracker] [bug #58257] urlwrite 403 Forbidden crashes octave, Mike Miller, 2020/04/27
- [Octave-bug-tracker] [bug #58257] urlwrite 403 Forbidden crashes octave, Dmitri A. Sergatskov, 2020/04/27
- [Octave-bug-tracker] [bug #58257] urlwrite 403 Forbidden crashes octave, Mike Miller, 2020/04/27
- [Octave-bug-tracker] [bug #58257] urlwrite 403 Forbidden crashes octave, Dmitri A. Sergatskov, 2020/04/27
- [Octave-bug-tracker] [bug #58257] urlwrite 403 Forbidden crashes octave, Dmitri A. Sergatskov, 2020/04/27
- [Octave-bug-tracker] [bug #58257] urlwrite 403 Forbidden crashes octave, Mike Miller, 2020/04/27