Import Issue on Python Version

2 views
Skip to first unread message

d.ca...@gmail.com

unread,
Feb 18, 2011, 12:13:28 AM2/18/11
to Restuflie Dev
Hello everybody... I was mading the specs for the basics functions and I found a big problem. Our client is expecting a header called "Content-Type" (with capitalized letters) and I was confused: does the pages of the web responds using capital letters in the headers? I tested by myself and I saw that all the other pages DON'T use any capital letters on the headers.

Just try yourselves:

<python>
from restfulie import Restfulie
Restfulie.at('http://google.com').get().headers
</python>

Tried with many other pages, all the same.

The real deal is: when I change in the restuflie-py's code to only use headers without capital letters ('content-type' and 'accept') it broke ALL restbuy integration tests and some unit tests.

What we gonna do? Change the restbuy's code to be according the rest of the web and fix the tests? Ideas, please?

--
Douglas Camata
Graduando em Ciência da Computação (UENF)

Twitter: @douglascamata
Skype: douglas_camata
-----------------------------------
Linux User #509211

d.ca...@gmail.com

unread,
Feb 18, 2011, 1:07:57 AM2/18/11
to Restuflie Dev
Sorry about the strange subject, I don't know where did it came from, I swear. hahahha

All the changes I made are on my fork of the project, I would love if somebody see it and agree with my point. 

I'll made more tests tomorrow morning, gotta get some sleep now.

Regards,

Guilherme Silveira

unread,
Feb 18, 2011, 6:35:56 AM2/18/11
to restfu...@googlegroups.com

hi douglas,

The header check should be case insensitive, you are right.just lowercase everything

Regards

On 18/02/2011 4:07 AM, "d.ca...@gmail.com" <d.ca...@gmail.com> wrote:

Sorry about the strange subject, I don't know where did it came from, I swear. hahahha

All the changes I made are on my fork of the project, I would love if somebody see it and agree with my point. 

I'll made more tests tomorrow morning, gotta get some sleep now.

Regards,


2011/2/18 d.ca...@gmail.com <d.ca...@gmail.com>


>
> Hello everybody... I was mading the specs for the basics functions and I found a big problem. O...




--
Douglas Camata
Graduando em Ciência da Computação (UENF)

Alexandre Atoji

unread,
Feb 18, 2011, 6:43:23 AM2/18/11
to restfu...@googlegroups.com, Guilherme Silveira
The Unit tests you can fix them, because these verify the existence of
"Content-Type" in dsl headers

--
Alexandre Atoji

Reply all
Reply to author
Forward
0 new messages