It works OK on emulators I have, but it doesn't work OK on my Nokia.
Everything works OK if all headers names are unique. It is not necessary the case as for example sites can use mulitple cookies, so I will have a number (>1) of "set-cookie" headers. Above code will return the right number of "set-cookie" headers, but all will be set to the value of the last occurance.
Is it another bug to be added to MIDP 2.0 implementation? Does anyone know a way round this problem.