Wikipedia:Reference desk/Archives/Computing/2014 January 6

= January 6 =

Need low-level tool for sending HTTP requests - Part II
I'm looking for a tool for sending HTTP requests. Something that runs on Windows. Specifically, I'm looking for something that will let me send an HTTP 1.0 request without a host header. Every tool I've tried forces me to include a host header. I've tried Fiddler and several others. I even tried writing my own tool using .NET but the .NET Framework adds host header even if you remove it. Can anyone recommend anything? AnonComputerGuy (talk) 20:40, 2 January 2014 (UTC)


 * Netcat -- Finlay McWalterჷTalk 21:13, 2 January 2014 (UTC)


 * You'd build the request in e.g. foo.txt and then do nc 192.168.0.20 < foo.txt -- Finlay McWalterჷTalk 21:25, 2 January 2014 (UTC)


 * But given that you seem to already be coding in .NET, I think you can solve this in that environment too. I imagine you're using .NET's http facilities (perhaps system.net.http.httpclient). Because it knows about HTTP, it's taking it upon itself to "fix" your request. You can avoid this if you avoid the httpclient library and use TCP directly (with e.g. system.net.sockets.tcpclient.  You have to build the request yourself (but that sounds like what you want anyway) and handle the headers in the response anyway (which isn't very hard). -- Finlay McWalterჷTalk 22:26, 2 January 2014 (UTC)


 * I presume you're doing this as part of some kind of debugging. Normally, of course, you really, really do always want the   header (and of course it causes no harm even if the webserver you're hitting isn't hosting multiple domains). —Steve Summit (talk) 23:22, 3 January 2014 (UTC)


 * Thanks. Apparently, in order to run Netcat, I have to install something called cygwin.  I installed it on Friday and have it running.  I created the request in a text file named request.txt.  The contents of the file are as follows:

GET http://mycompanyname.com/somepath HTTP/1.0


 * where mycompanyname.com is a real domain. I then execute the following command:

nc http://mycompanyname.com < c:/cygwin/request.txt


 * I then get the following output:

usage: nc [-46CDdhklnrtUuvz] [-I length] [-i interval] [-O length] [-P proxy_username] [-p source_port] [-s source] [-T ToS] [-V rtable] [-w timeout] [-X proxy_protocol] [-x proxy_address[:port]] [destination] [port]


 * Am I doing something wrong? AnonComputerGuy (talk) 19:39, 5 January 2014 (UTC)


 * You need to specify the port number:

nc http://mycompanyname.com 80 < c:/cygwin/request.txt


 * Also, when I've done this sort of thing in the past, I think it's been important to terminate the request with an extra newline, so if you have any problems, try putting a blank line at the end of request.txt. —Steve Summit (talk) 20:29, 5 January 2014 (UTC)


 * A-ha! It looks like it was both the missing port and the lack of a line break.  My request now goes though.   Thank you everyone for your help.  You have no idea what a total b**** this was to do.  AnonComputerGuy (talk) 20:38, 5 January 2014 (UTC)


 * You're welcome! Glad it worked out.  (Also, next time, no need to copy-and-paste the thread -- we would have noticed and replied if you'd merely updated the original January 2 entry.) —Steve Summit (talk) 20:49, 5 January 2014 (UTC)


 * When I click Edit for the original January 2 entry, I get redirected to the archived version. I couldn't figure out how to edit the original entry so that's why I created a new one.  AnonComputerGuy (talk) 21:28, 5 January 2014 (UTC)


 * Ah, yes, but it turns out that the recent few days' worth of archives -- including, as of today, January 2's -- are made to appear here on the main page, via a slightly-obscure process Wikipedia calls "transclusion". Go ahead and edit the (archived) January 2 entry now, and see what happens! —Steve Summit (talk) 22:54, 5 January 2014 (UTC)
 * I found this procedure confusing too when I first encountered it. Does it serve any useful purpose? It would be much clearer if threads were only moved to archive once they moved off this page. 86.128.3.18 (talk) 00:57, 6 January 2014 (UTC)
 * This is more of a topic for the RD talk page -- I've copied it here. —Steve Summit (talk) 02:37, 6 January 2014 (UTC)


 * Too late, I guess, but ncat is better than netcat and it has a non-Cygwin Windows build (though I'm sure there are non-Cygwin builds of the original netcat as well). ncat's --ssl and --crlf flags are especially useful for debugging HTTP(S) requests. -- BenRG (talk) 12:25, 6 January 2014 (UTC)

Data Manipulation
Can anybody tell me what does LOAD, ROTATE and AND mean in memory terms with computers? Introduction to Information Technology 4th Edition. Thank you. David Smith Thesmithster (talk) 04:14, 6 January 2014 (UTC)


 * These are terms one might see in Assembly language. LOAD would mean load the contents of a memory location into a register in the CPU. ROTATE LEFT would mean one or more bits from the left side of a register would be removed, the remaining bits would be shifted to the left, and the bits that had been removed would be placed on the right side of the register. So if a register in an 8-bit computer initially contained 10111111 and the register was rotated left by 2 bits, it would contain 11111110 after the operation. AND would mean that the contents of two registers would be compared bit by bit; if at a particular location, both registers contained 1, the result would be 1. If either location contained 0, the result would be 0. The exact details would be depend on the architecture of the particular computer. Jc3s5h (talk) 04:44, 6 January 2014 (UTC)

How to open TPF graphic model files
I have a TPF file which contains a modified model from a computer game. How can I open it to rotate the model to see it at different angles? --78.148.110.243 (talk) 09:31, 6 January 2014 (UTC)
 * As far as I can tell after a quick Google, TPFs are Texmod Package Files, and hold 2D images to be used as textures on game models. They are not 3D models themselves.  See https://code.google.com/p/texmod  Rojomoke (talk) 16:41, 6 January 2014 (UTC)