Moovweb - uncompress gzipped outgoing_response.http content? - gzip

I have a Moovweb project and I'm trying to compare the incoming_response.http and outgoing_response.http files in tmp/messages/... folders.
The incoming_response.http from the upstream server is saved in plain text,
but the outgoing_response.http file is gzipped content!
How can I convert it to plain text so I can look through the response?
Thanks!

put this in your main.ts files:
export("disable_compression", "true")

Related

Wget file format

I have to download all site content and then parse the downloaded folder for "*.pdf" files. I am downloading site using wget -r --no-parent http://www.example.com/ But the problem is that sometimes link looks this
http://www.foodmanufuture.eu/dpubs?f=K20
and the dowloaded pdf is downloaded with name "dpubs?f=K20" and file format is not specified, it does not look like this "dpubs?f=K20.pdf", is there a way to check how many pdf files I have in this folder?
Have you tried the --content-disposition flag? From the man page:
If this is set to on, experimental (not fully-functional) support for "Content-Disposition" headers is enabled. This can currently result in extra round-trips to the server for a "HEAD" request, and is known to suffer from a few bugs, which is why it is not currently enabled by default. This option is useful for some file-downloading CGI programs that use "Content-Disposition" headers to describe what the name of a downloaded file should be.
So it tries to ask the server for a filename. I tried it for the URL you gave and it seemed to work.
You could use the command
file filename
Like this:
file pdfurl-guide
pdfurl-guide: PDF document, version 1.5
You could use:
file *
To know exactly which files in your folder are pdf files

Minify / compress JS and CSS by Server?

my webpage is running on an Apache Server, because of big CSS and JS files I want to minify/compress the files like this:
If the CSS/JS file is changed, the Server should that that changed file, compress it and save it as a new file?
How can I do that?
You can use Gulp https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md it can minify automatically anytime you modify your styles.

Can't download and save srt file using DownloadFile

I want to download a srt (subtitles) file from subtitles4free.net but I can't understand how I am supposed to do it.
I tried downloading it using
My.Computer.Network.DownloadFile("http://www.getsubtitle.com/webService/download_subtitle.php?cod_bsplayer=38187011&post_date=11-06-2015", "C:\Users\User1\Downloads\subs.srt")
but the file that gets downloaded is a srt file containing some weird text, probably because it has to be a direct download url with a file extension. Is there any way to get this to work and if not, is there any other way of doing this?
The file format you are downloading is ZIP, not SRT. Save it as a .zip file. Extract it and you'll get the .srt file.

Objective-C NSString pathExtension for example.tar.gz?

When calling the pathExtension method on a string that contains something such as "example.tar.gz" I get ".gz" as the result. I can do some string manipulation to get the real extension, but I'm number wondering if there is a built in method that I'm overlooking? (I have checked the docs, but I don't see anything).
Obviously pathExtension is working as expected in this case. The documentation for pathExtension says:
The path extension is the portion of the last path component which
follows the final period, if there is one.
I can see where you are coming from with your example of a tarred gzipped file. However, I would say that .gz is the extension. Unzipping the file (with gzip) will result in a .tar file which can be extracted with tar.
I assume that the convention of naming files with the .tar.gz extension started before tar was able to also perform the gzip compression. The gzip application appends .gz to the filename of the file being compressed. For example, gzipping a log file, access.log, will result in a file called access.log.gz.
The .tgz extension has been used for tarred gzipped files particularly where the filename needs to be preserved on file systems that would mangle the extension (e.g. DOS).

How to uncompress and import a .tar.gz file in kettle?

I am trying to figure out how to create a job/transformation to uncompress and load a .tar.gz file. Does anyone have any advice for getting this to work?
you want to read a text file that is compressed?
Just specify the file in the text file input step in the transformation - and specify the compression (GZip). Kettle can read directly from compressed files.
If you do need the file uncompressed then use a job step - not sure if there is a native uncompress, but if not just use a shell script step.
There is not such component in kettle to uncompress the tar.gz file i found.
But if we have the csv file text compressed in gizip format we can use gzip input component.