Main BLOGGER
Google
WWW THIS BLOG
Tuesday, July 22, 2008
 
obscured URL

http://email.about.com/gi/dynamic/offsite.htm?site=http://www.pc-help.org/obscure.htm


In Sum

URLs can be obscured at least three ways:

  1. Meaningless or deceptive text can be added after "http://" and before an "@" symbol.
  2. The domain name can be expressed as an IP address, in dotted-decimal, dword, octal or hexadecimal format; and all of these formats have variants.
  3. Characters in the URL can expressed as hexadecimal (base 16) numbers.


--
Pop (Pu Liu)

 
POST redirect issue in HTTP
see:
http://www.theserverside.com/tt/articles/article.tss?l=RedirectAfterPost

t is interesting that PRG pattern exploits non-standard behavior of browsers and web servers. HTTP 1.1 defines several redirect response codes in 3xx range. Some of these codes require browser to use the same request type, some require to change POST to GET, some require to obtain user confirmation when request is redirected. Turns out that many of these requirements are not implemented by popular browsers. Instead, they have common de-facto behavior, like redirecting POST to GET without confirmation if received 302 code. This feature is used by PRG pattern.

This behavior is wrong for 302 ("Found") code, but is absolutely correct for 303 ("See Other") code. Still, few servers return 303 when redirect with GET method is required. HttpResponse.sendRedirect method does not allow to set response code, it always returns 302. It is possible to emulate sendRedirect(url) behavior using the following methods:

res.setStatus(res.SC_SEE_OTHER);
res.setHeader("Location",url);

where SC_SEE_OTHER is the proper 303 code, but sendRedirect provides some additional service like resolving relative addresses, so this is not a direct snap-in. The discrepancy between browser behavior and HTTP standard can be resolved, if 302 and 303 codes considered equal, and another code for proper 302 behavior were created.

In any case, I doubt that browser vendors will change implementation of 302 response code, because too many applications relay on it. The good thing is that modern browsers understand and correctly process 303 code, so if you want to be sure, return 303 instead of 302

--
Pop (Pu Liu)

Thursday, July 10, 2008
 
Re: build google desktop sidebar in ubuntu 7.10

Failed to update gadget metadata

Fix:

sudo aptitude install ca-certificates


On Thu, Jul 10, 2008 at 7:11 PM, Pu Liu <pop.liu@gmail.com> wrote:

This project also depends on the following libraries:

You can choose from the two toolkits: GTK or QT. If you choose GTK, this project also depends on the following libraries:

  • cairo >= 1.0.0, 1.2.0 or above is better.
  • gtk >= 2.8.0, 2.10.0 or above is better.



1. zlib

sudo apt-get install zlib1g-dev

2. spidermonkey

sudo apt-get install libmozjs-dev


3. libcurl
sudo apt-get install libcurl4-openssl-dev

4. libxml2
 sudo apt-get install  libxml2-dev

5. xulrunner
sudo apt-get install xulrunner-1.9-dev


6. gtk+ 2.0
sudo apt-get install libgtk2.0-dev

7. dbus
sudo apt-get install libdbus-1-dev

8. gstreamer
 sudo apt-get install libgstreamer0.10-dev
 sudo apt-get install libgstreamer-plugins-base0.10-dev


9. GTKMOZEMBED
sudo apt-get install firefox-dev






--
Pop (Pu Liu)



--
Pop (Pu Liu)

 
build google desktop sidebar in ubuntu 7.10

This project also depends on the following libraries:

You can choose from the two toolkits: GTK or QT. If you choose GTK, this project also depends on the following libraries:




1. zlib

sudo apt-get install zlib1g-dev

2. spidermonkey

sudo apt-get install libmozjs-dev


3. libcurl
sudo apt-get install libcurl4-openssl-dev

4. libxml2
 sudo apt-get install  libxml2-dev

5. xulrunner
sudo apt-get install xulrunner-1.9-dev


6. gtk+ 2.0
sudo apt-get install libgtk2.0-dev

7. dbus
sudo apt-get install libdbus-1-dev

8. gstreamer
 sudo apt-get install libgstreamer0.10-dev
 sudo apt-get install libgstreamer-plugins-base0.10-dev


9. GTKMOZEMBED
sudo apt-get install firefox-dev






--
Pop (Pu Liu)


Powered by Blogger

Google
WWW THIS BLOG