header

Set Caching Headers in Apache

Hi All, I want to set some headers in Apache 6.0.16 such as (caching headers max-stale, min_fresh no_store...) ....any suggestions helps are most welcomed. ... Thanks :) ...

Request Accept media type in RESTlet 2

How can I identify the resource media type in RESTlet2, I tried following in my class extended from ServerResource @Get public Object onGET(){ System.out.println("================="); System.out.println(this.getRequestEntity().getMediaType()); ... It prints a null when I do any request. I want to get the list of all Accept medi...

PHP multiple file download

I've seen this example on the documentation for PHP readfile <?php $file = 'monkey.gif'; if (file_exists($file)) { header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename='.basename($file)); header('Content-Transfer-Encoding: binar...

PHP File Download

Hello, I'm currently building a script that will allow a user to download a file via a URL without actually seeing the filename or where the file is stored. So far I have everything built out, but I need to know how I would go about calling the file to open and download. I currently have a working version (code below), but for some re...

Cannot overwrite Cache-Control in PHP

I've moved a older site to a new server, and the client has found a very odd behaviour. Very close to the end, I have this code: if (!$this->cache) { header('Expires: '.gmdate('d M Y H:i:s', 946684800).' GMT'); header('Cache-Control: no-cache'); header('Pragma: no-cache'); } Now the odd thing is the Cache-Control line doe...

WPF GroupBox ControlTemplate : How to apply a Style only to elements in the Header ?

Hi. I'm trying to make a ControlTemplate for a GroupBox such as if a TextBlock is declared in the Header it's background should be set to yellow. The problem is that, although I define a style for TextBlocks in the ContentPresenter for the Header, it's not applied except on those TextBlocks which are autogenerated by WPF. Here is the...

Problem reading URL with Python. Code opens up any other URL. Possible Header or Cookie problem.

Using python urllib or urllib2, for the life of me, I can not read the following URL: http://celem.michoacan.gob.mx/celem/publica/ficha_informativa_ordenamiento.jsp?p_id_ordenamiento=478 This page reads fine with Firefox or IE. I tried spoofing the User-Agent to simulate Firefox to no avail. This site uses cookies. I also tried using th...

Alternative to .NET WSE 3.0

I'm using .NET 2.0. There are any alternative to .NET WSE 3.0? Is it possible to pass username and password in soap header without any toolkit, only using code? Thanks ...

Include a ColdFusion report template in another ColdFusion report template

Is there a way to include/wrap PDF data generated from a ColdFusion template inside another ColdFusion template, or a cfdocument tag? I'm working with a system that has generates lots of different reports, some are generated from .CFR templates, others are created by cfdocument/cfdocumentitem tags with HTML inside. What I need to do is...

C++: include multiple header files with same name from different namespaces

How do you solve created by including a header file with the same name as another header file already indirectly included as a result of another include? For instance: // src/blah/a.hpp #ifndef A_HPP #define A_HPP namspace blah { class A { } } #endif // src/blah/b.hpp #ifndef B_HPP #define B_HPP #includes "a.hpp" namspace blah {...

What is PHP header? Explain to me like I was a 5-year old!

I'm wondering about what headers are. I use PHP strictly for HTML completion and I thought I had to send text/html header when the output was text and then image/jpeg header from a separate script which was used as source in an image tag but then someone suggested me to take away the headers because they made nothing... And I did and eve...

[WAV file] Why are an integers bytes stored backwards? Does this apply to headers only?

I'm currently trying to decipher WAV files. From headers to the PCM data. I've found a PDF (http://www.tdt.com/T2Support/technical_notes/tn0132.pdf) detailing the anatomy of a WAV file, and I've been able to extract and make sense of the appropriate header data using Ghex2. But my questions are: Why are the integers bytes stored backw...

Download any file using PHP

How can I download files(text/pdf/etc) using php with a header that pops-up in order for the user to choose Save or Open? The file is stored in (admin/) I'm using this but it won't work. The downloaded file is empty! Here's my code: //get the filename $filename = $_GET['filename']; //open the file based in filename and path $fp =...

Apache -Caching: How to Configure Response headers in Apache 2+.

Hi All, I am very new in Apache Configuration and caching. I want set some headers in Apache (eg max-age, min-fresh, last modified etc). Have checked Modules are there and there installed and loaded.... Have edited httpd.conf and re-started the same after making some changes regarding caching headers...... e.g. <FilesMatch "\.(...

Message encapsulation in C (Adding protocol headers)

How can we encapsulate a message with any protocol header.Message can be char * or a pointer to memory field (void *). Actually i want to do is : message --> add protocol header(e.g udp) |udp header + message | struct UdpHeader { int Sport,Dport,chksum,size; } void sendMsg(void *msg,int sport,int dport,int size) { Udp...

Sample code similar to Messaging application of BlackBerry

I want to display messages from my application exactly in the same way as that of native messaging application of Blackberry. How do I achieve it in listfield? Also I want to add date headers that will display messages in the order in which they are received. ...

How to Use Android addHeaderView

Can Android's addHeaderView() be used to add multiple headers throughout a single ListView? Can someone give an example of how to do this? I was able to accomplish what I wanted by manipulating the IconicAdapter Class... is there any reason why I should not do it this way? I feel this could be modified for more advanced implementations....

Send information in Soap Header to WCF service in C#

i want a web application to create a service reference to my WCF service, insert information to the header of the soap call and call my WCF method. i read about MessageContract attribute and declared one in the interface file: [MessageContract] public class BasicServiceHeader { [MessageHeader] public string myString; } my WCf...

SWT: Multiline Table header / Multiline TabItem text

I migrate application from Swing to SWT and cannot find out how to make table headers in SWT multiline and also TabItems to have multiline text. In Swing it was not problem but in SWT no way. For table header i found that on linux it is working but i need it for windows. I tried \n and <br> but nothing. ...

Including a Windows DDK Header

I am writing a user-space Win32 application. However, as part of this application I need to make some DeviceIo calls to the Windows 1394 stack. The header file which contains the prototypes for these DeviceIo calls is included as part of the Windows DDK at: C:\WinDDK\7600.16385.1\inc\api\ntdd1394.h (Although the header claims to be ...