[Netsurf-develop] Autobuilder update
by James Bursa
I've upgraded the autobuilder to gcc 3.4.4. There are also new versions of
libcurl (with hosts file support), openssl, and libxml (with iconv support),
and recompiled libmng and libjpeg with 3.4.
James
18 years, 3 months
[Netsurf-develop] Cookie problem
by Steve Turnbull
Hi
I'm developing a PHP application and have come across a problem with
NetSurf's handling of cookies:
I am using PHP sessions, the server automatically stores the session ID in a
browser cookie. That bit is working fine.
However the cookie does not disappear or get overwritten in NetSurf when I
destroy the session in the PHP code. (I don't know the protocol of how that
works or what the exact browser behaviour should be.)
This means that when I use the PHP session_start() it checks for a cookie,
sees the one with the old ID and re-starts that session instead of creating a
new one.
I have checked the code with O2 and IE, both behave as expected - they keep
the old session ID until I destroy the session and then start with a new
session ID.
In the PHP I am buffering all HTML output until processing is finished and
then sending it all in one go.
Incidentally (in case it helps) the behaviour was weirder before:
Originally I has just sending HTML to the browser without any <html> <head>
</head> <body></body> </html> tags. When I was doing this NetSurf was
apparently failing to report the old session ID every other time so I was
getting a new session every other access.
Putting in the tags gave the behaviour described first.
Steve
--
Steve Turnbull (steve@theturnbulls(dot)fsworld(dot)co(dot)uk)
... Six lemmings walk into a bar. "Ouch! Ouch! Ouch! Ouch! Ouch! Ouch!"
18 years, 3 months
[Netsurf-develop] (Old-style) Cookies failure
by John Duffell
I've just tried 8/12/04 12:45 build.
Just a couple of things, I found that in choices when there is a pop up menu
to choose something clicking on the display icon doesn't pop up the menu,
only on the pop-up icon bit, which according to the style guide (and my ease
of use) should work on either :) But only a minor point!
The other is cookies (netscape style perhaps) don't seem to work. E.g. this
should set the cookie and then it should be sent back with the second
request, but it isn't. Reading the cookies spec it seems to be using the
"old" cookie style, but I presume that's still supposed to work :) Feel free
to try it yourself, at http://www.mogsnet.net/cgi-bin/kor/Games.pl
accepted connection from loopback [127.0.0.1]
connecting to 'www.mogsnet.net' [68.150.22.255] on port 80
connected to www.mogsnet.net [68.150.22.255]
POST http://www.mogsnet.net/cgi-bin/kor/login.pl HTTP/1.1
User-Agent: NetSurf
Host: www.mogsnet.net
Accept-Encoding: gzip
Referer: http://www.mogsnet.net/cgi-bin/kor/Games.pl
Accept-Language: en, *;q=0.1
Content-Length: 24
Content-Type: application/x-www-form-urlencoded
user=johnd&pass=[something]HTTP/1.1 200 OK
Date: Wed, 08 Dec 2004 14:35:31 GMT
Content-Length: 645
Content-Type: text/html; charset=ISO-8859-1
Server: Apache/2.0.40 (Red Hat Linux)
Set-Cookie: user_ip=62.252.0.6~user=johnd~pass=[something]
<HTML><title>Knights Of The Round - Logged in As johnd</title><frameset cols=110,*,110 MARGINWIDTH=0 MARGINHEIGHT=0 FRAMEBORDER=NO BORDER=0 FRAMESPACING=0 NORESIZE><frame name="menu" src="gmenu1.pl" scrolling=no frameborder=no framespacing=0 noresize><frameset rows=*,75 MARGINWIDTH=0 MARGINHEIGHT=0 FRAMEBORDER=NO BORDER=0 FRAMESPACING=0 NORESIZE><frame name="main" src="main.pl" scrolling=auto frameborder=no framespacing=0 noresize><frame name="lxchange" src="adbanner.pl" scrolling=no frameborder=no framespacing=0 noresize></frameset><frame name="menu2" src="gmenu2.pl" scrolling=no frameborder=no framespacing=0 noresize></frameset></HTML>
connection closed by loopback [127.0.0.1]
listening on port 8080
accepted connection from loopback [127.0.0.1]
connecting to 'www.mogsnet.net' [68.150.22.255] on port 80
connected to www.mogsnet.net [68.150.22.255]
GET http://www.mogsnet.net/cgi-bin/kor/main.pl HTTP/1.1
User-Agent: NetSurf
Host: www.mogsnet.net
Accept-Encoding: gzip
Accept-Language: en, *;q=0.1
HTTP/1.1 200 OK
Date: Wed, 08 Dec 2004 14:35:58 GMT
Content-Length: 2798
Content-Type: text/html; charset=ISO-8859-1
Server: Apache/2.0.40 (Red Hat Linux)
<link rel="stylesheet" href="http://blog.mogsnet.net/styles-site.css" type="text/css" /><div id="container"><div class="content">Error: You are trying to access a page which cannot be viewed unless you <a href="Games.pl" target="_parent">Login</a>.<br>[stuff]</p>
connection closed by loopback [127.0.0.1]
--
John Duffell
http://www.duffell.riscos.me.uk/
18 years, 3 months
[Netsurf-develop] searching
by tony moore
Some suggestions:
Select-clicking the search button opens the search dialogue box
with an empty 'Find' field, which is fine. May I suggest that a
second select-click on the search button should restore the text
of the last search to the 'Find' field, and also that menu-click
on the 'Find' field should open a menu of all the searches made in
that session (as in StrongED).
Found-text appears on the top line of the window, which can make
it difficult to see its context, since the preceding text is not
visible without clicking on the scrollbar (thus interrupting the
search). I suggest that found-text should appear a customisable
number of lines below the top of the window (as in StrongED).
Found-text should be highlighted (I believe that this may have
been mentioned before but I cannot find it now).
Tony
___________________________________________________________
Win a castle for NYE with your mates and Yahoo! Messenger
http://uk.messenger.yahoo.com
18 years, 3 months
[Netsurf-develop] Developers: xcalloc/xrealloc/xstrdup-purge week
by James Bursa
A lot of code in NetSurf still uses xcalloc(), xrealloc(), xstrdup(), which
exit on memory exhaustion. We need to remove all these uses, so I'm
nominating this week "xcalloc/xrealloc/xstrdup-purge week".
In some cases replacing these functions will be easy, but in others the return
condition of the caller will have to change so that it can return failure.
For example, void functions may change to bool (true for success, false for
failure), and callers will need modifying to report the error or pass it up
as appropriate. Discuss with other developers if a solution is not obvious!
Read the "Error handling" section in the codedocs if you haven't recently.
Functions which need replacing and counts in each file:
xcalloc()
content/content.c:1
content/fetchcache.c:1
debug/fontd.c:2
desktop/browser.c:1
desktop/imagemap.c:5
desktop/loginlist.c:1
render/box.c:18
render/html.c:1
riscos/401login.c:3
riscos/filetype.c:2
riscos/gui.c:2
riscos/history.c:1
riscos/uri.c:1
utils/utils.c:6
xrealloc()
desktop/browser.c:2
desktop/imagemap.c:2
render/box.c:1
render/html.c:2
utils/utils.c:2
xstrdup()
content/fetchcache.c:1
desktop/imagemap.c:2
desktop/loginlist.c:4
render/box.c:13
render/html.c:6
riscos/401login.c:3
utils/utils.c:2
We also need to modify squash_whitespace() to not exit on memory exhaustion,
and update callers if necessary
desktop/save_text.c:1
render/box.c:6
render/html.c:1
riscos/hotlist.c:1
utils/utils.c:2
If we each take a few files, we can get this done fast. I'll start with the
files in render.
Thanks!
James
18 years, 3 months
[Netsurf-develop] Line-split URLs not followed
by Simon Smith
This link (extracted from http://www.dunx.org/cgi-bin/orange-mc doesn't
work. In fact, Netsurf doesn't even register that it /is/ a link:
<a href="/cgi-bin/forum?forum=game00002&displayStyle=default&sortKey=id&sortOrder=1
&tail=40" title="Last 40 moves of game 2">Orange Long Game</a>
As far as I can see, the reason it doesn't work is because there is a line
feed after &sortOrder=1 - the URL continues on the next line with &tail=40,
but Netsurf loses the plot at this point. Now, shouldn't the link still work
correctly despite the newline?
Simon Smith
--
"Studies have shown that monkeys can pick stocks better than most
professionals. That's why the Dogbert Mutual Fund employs only monkeys.
Yes, our fees are high, but I don't apologise for hiring the best."
- Dogbert
18 years, 3 months
[Netsurf-develop] CSS resources available
by Chris Terran
Now that RISC OS has some browsers which support CSS (Cascading
Style Sheets) -- Netsurf very well, Oregano2 rather less so --
it seems time to provide some support for it.
As a start, I've put together a StrongHelp manual for CSS Level 1.
You can find it at:
http://www.roast.iconbar.com/css/
...along with a couple of other goodies. There are some filetype
sprites for CSS files, a StrongED editing mode for same, and a CSS
demonstration page. I suggest you look at the latter in Netsurf
first ... then try O2 ;-(
The manual isn't just a reference -- it also includes a quick-start
course in CSS1, explanations of the concepts behind it, how to use
CSS in your web pages, and a brief overview of RISC OS browser
support.
All feedback welcome ... I'm sure it can be improved!
Best, Chris
--
*** CSS resources for RISC OS at www.roast.iconbar.com/css/
18 years, 3 months