WinInet, Proxies and NTLM

For quite some time now I heard about customers telling me that PopScan seems to be having problems with proxy servers using NTLM authentication. I knew that and I told everyone that this is not supported.

But I could not understand it: Why did it not work. I mean, I went from my own HTTP-Routines to WinInet just to be able to use the system-wide proxy server settings and connections

When using WinInet and INTERNET_OPEN_TYPE_PRECONFIG with InternetOpen, the whole thing is supposed to just work – as long as IE itself does work. But in my application this wasn’t the case and I had no idea why. As soon as NTLM was enabled at the proxy, I was just getting a 407 HTTP_PROXY_AUTHENTICATION_REQUIRED status from the proxy, despite the correct password being used

MSDN was of help (taken from the documentation of InternetOpenRequest):

If authentication is required, the INTERNET_FLAG_KEEP_CONNECTION flag should be used in the call to HttpOpenRequest. The INTERNET_FLAG_KEEP_CONNECTION flag is required for NTLM and other types of authentication in order to maintain the connection while completing the authentication process

I’ve added this flag (and some more – now that I already was at it), recompiled, tested and -yes- finally it does what it should: It works just out of the box. No more 407, no more entering password for the users. One more thing that switched its state from “not supported” to “supported and working splendidly”.

This is with a NTLM-enabled Squid Proxy, but it should work with Microsoft ISA too.

Console game Videos

I’ve already posted about this site with its speedruns for old console games. What I did not know back then is that these videos are created using slow motion and savestates which makes them look so expectionally good (if you are up for movies not using savestates, then this is for you).

Though the videos are made with savestates, they are extremely fun to watch, so bisqwits page is one of those I have been visiting every day just to look for updates. Recently it went all quiet…

And today I see what was bisquwit keeping from posting new movies: The whole page got redesigned (on a WIKI-basis) and SNES and Genesis (Mega Drive here in Europe) Movies were added. Very nice. My Bittorrent client is already hard-working ;-)

Optimized comment display

Yesterday, when I was reading through old entires here on, it came to me that I have never really styled the comments-section of my postings during the redesign. I’ve taken the old MT-Template and style definitions and let it rest at that.

I wanted to change that and so I did:

  • The comments are in one of those grey boxes now. I think the can be a lot better distinguished from each other now.
  • The comment-form is hidden by default. The used JavaScript is quite straight forward, but if you don’t want to use JS and still comment, use a User defined stylesheet and set
            display: show !important;
  • Using MTEntryIfComments, the trackback-list is only shown if there actually are trackbacks
  • Using the same plugin, if there are no comments, a message is displayed, encouraging to write one.

I like this solution quite a lot. The entries are quite less cluttered that way. What do you think?

Movable Type licensing

While looking for some documentation for improving my comments-system (later post), I came across a link to this blog entry that announces a revised licensing scheme for Movable Type 3.0.

This time they actually did it right: The (still) free edition is now clearly announced. The personal edition is what quite a lot of users (including myself) have wanted (unlimited blogs) and it is quite affordable. This is nice.

Thank you, Movable Type

RAM doubler ;-)

I have a server (running with 1.5 GBytes of RAM and I’m running Gentoo Linux (another candidate for my all-time favourites list, but it’s still too soon for that. I’m only working with it for a little bit more than one year). And as I wanted the thing to be as secure as possible, I created a kernel from scratch without module support.

What I’ve always asked myself is why the heck “free” just lists 896 Mbytes of available memory:

galadriel root # free -m
             total       used       free     shared    buffers     cached
Mem:           885        193        692          0          6         69
-/+ buffers/cache:        117        768
Swap:          976          0        976

At first I had a BIOS problem in mind, bit after having seen GRUB recognizing the whole amount of memory, I came to the conclusion that there must be some problem in the kernel

As 2.6 is still quite new, I waited for the next gentoo-dev-sources to be released which happened somewhere around today. With the new kernel the problem still existed, so I dug deeper

dmesg output something like this in its first lines:

Warning only 896MB will be used.
Use a HIGHMEM enabled kernel.

Though I misread the second line as a status message (stating that HIGHMEM is being used) instead of a request, I entered the above message to Google Groups and found out that the second line indeed is the solution to the problem

In Processor type and features, set High Memory Support to 4GB and recompile your kernel.

What I don’t understand: I’m having this problem with 1.5GB of RAM and this option seemed to me like talking about 4 GB. But Google was helpful like most of the time, enabling me to virtually double the available RAM

galadriel root # free -m
             total       used       free     shared    buffers     cached
Mem:          1520        333       1186          0         12        158
-/+ buffers/cache:        162       1358
Swap:          976          0        976

Nice! Isn’t it?

Update: For those that have not yet noticed it: The title of this entry does hint at products like this, though this one is at least honest in its description.

All-time favourite Tools

Who doesn’t have them? Those all-time favourite tools. It’s not just software, it’s passion. Those tools are tools that you always have to use. Tools where all objectivity seems to fade away when it comes to making recommendations. Tools where you actively monitor (or even participate in) the developement. Tools where you, though they are free, gladly donate some money. Tools you love.

Of course, I too know of some tools. And this is my list (in no particular order):

  • Exim is an UNIX MTA (mail server). It is not only extremely configurable, it’s even easy to do so. Back in 2000, Exim was the only MTA capable of being used in a environement where all accounts are stored in a MySQL database. Since then I am using Exim for all my mail serving needs and I still have not stopped discovering new ways the incredibly flexible configuration scheme can be used to do even fancier stuff. But the greatest thing about exim is it’s creator, Philip Hazel. Phil is a ingenious programmer. A really pragmatical one. I love to read his emails on the exim mailinglist. I love to see his solutions that are quite often so much easier than what others suggested but leave nothing to ask for at all. Btw: During summer 2001 I even extended my Accounts-in-MySQL-Configuration and put it on the web as a .txt-File. Oliver Siegmar was convinced enough to build XAMS on it. I really like Exim
  • PostgreSQL came to my rescue when I desperatly needed a RDBMS that really merits that name. I constantly run into limitations of MySQL, so I was on the lookout for a better alternative. With the TOAST tables of PostgreSQL 7.1, it was finally possible to have length-unlimited columns which I needed in the webapplication I was working with (for storing long comments), so it became a real solution. Since then PostgreSQL never failed me or any of our customers. In my journey with PostgreSQL I learned a lot about programming database systems while reading through the posts of people like the ever so conservative Tom Lane and others. What a great community. What a great database server!
  • InnoSetup (and it’s graphical frontend ISTool) is a easy to use and extremely powerful generator for Windows Installations. I know that you are supposed to use MSI these days, but InnoSetup works, has any feature you could dream of and – that’s the point – is terribly easy to use. My journey with InnoSetup is a long one. It began back in 1996, where I was the first translator at all (now long outdated) and it goes on through nearly all releases till’ today. Inno’s programmer, Jordan Roussell is another one of those extremely talented ones. Reading his posts in the support newsgroups is a real pleasure – reading Inno’s sourcecode is very enlightening. How powerful such a little tool can be!

And you? Do you have such tools in your toolbox? Do you use the words love and software in the same phrase? I certainly do!

Web Applications and the View State

Today, it came to my mind, that I know of a problem with some web applications, which apparently few else seem to know about. What is worse, is that those new technologies like ASP.NET and Java Server Faces seem to run straight into the problem.

This article is even bigger than the usual, so I split it up.
Continue reading “Web Applications and the View State”