Darkside  

Voltar   Darkside > Darkside > Comunidade
FAQ Calendário Postagens do dia Buscapé Search

Responder
 
Thread Tools
Never Ping
🌀 Trooper
 

Gamertag: Willian Braga PSN ID: Never_Ping XFIRE ID: neverping Steam ID: neverping
Default usando mod_header

12-04-06, 10:53 #1
Seguinte:

To precisando usar o mod_header para mudar a característica de como as pessoas possam fazer acesso a um servidor Apache.

Exemplificando

Imagina que alguem faça um request assim

WOOT /Diretorio/arquivo.html HTTP/1.1

Dae o Apache vai mandar um 501 - Not Implemented naturalmente, mas ao invés disso, eu queria re-escrever o pedido para que quem pedisse WOOT virasse como no exemplo abaixo:

GET /Diretorio/arquivo.html HTTP/1.1

Sacaram? Jeeep!!! J5!!!





Never Ping is offline   Reply With Quote
serjaum
Master Chief
 

Gamertag: serjaum
12-04-06, 10:57 #2
chama o elunerdo

serjaum is offline   Reply With Quote
Eluan
Trooper
 

Steam ID: eluancm
12-04-06, 11:03 #3
"This module provides for the customization of HTTP response headers."

Pelo que eu entendi, esse módulo só altera as headers de resposta, não permitindo analizar os requests...

EDIT: No apache 2.0 também tem RequestHeaders, deixa eu dar uma lida...

Eluan is offline   Reply With Quote
serjaum
Master Chief
 

Gamertag: serjaum
12-04-06, 11:05 #4
tentei pensar um pouco

header nao seria apenas o q vc gostaria q mostrasse pro usuario no navegador uma mensagem relativa ao erro sei la?

serjaum is offline   Reply With Quote
Eluan
Trooper
 

Steam ID: eluancm
12-04-06, 11:17 #5
Pronto.

Dá pra pegar valores de envs, mas não sei como colocar o valor de "WOOT" em uma env

So... Não deu >D

Eluan is offline   Reply With Quote
Eluan
Trooper
 

Steam ID: eluancm
12-04-06, 11:18 #6
Quote:
Postado por serjaum
tentei pensar um pouco

header nao seria apenas o q vc gostaria q mostrasse pro usuario no navegador uma mensagem relativa ao erro sei la?
Headers são usadas em toda comunicação Navegador<->Servidor

Indicando versões, compatibilidades, informações gerais e outras firulas...

Eluan is offline   Reply With Quote
Bombastic
The Alpha Male
 

12-04-06, 11:20 #7
isso eh um header tradicional

 

Bombastic is offline   Reply With Quote
Aveia-Quaker
Trooper
 

12-04-06, 11:33 #8
Eu ein.. isto implicaria em mudar o padrão do protocolo HTTP... Não acho que deveria ser possível isso.... Se for possível é sacanagem

Aveia-Quaker is offline   Reply With Quote
Eluan
Trooper
 

Steam ID: eluancm
12-04-06, 11:39 #9
Code:
eluan@eluan ~ $ nc eluan.casa 80
WOOT /
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>501 Method Not Implemented</TITLE>
</HEAD><BODY>
<H1>Method Not Implemented</H1>
WOOT to /index.html not supported.<P>
Invalid method in request WOOT /<P>
<HR>
<ADDRESS>Apache/1.3.34 Server at eluan.casa Port 80</ADDRESS>
</BODY></HTML>
APACHE NERD


EDIT: "analisar" é com S e não com Z no post ali em cima

Eluan is offline   Reply With Quote
Never Ping
🌀 Trooper
 

Gamertag: Willian Braga PSN ID: Never_Ping XFIRE ID: neverping Steam ID: neverping
12-04-06, 12:20 #10
http://httpd.apache.org/docs/2.0/mod/mod_headers.html

Eu vi isso:

Header Directive

This directive can replace, merge or remove HTTP response headers. The header is modified just after the content handler and output filters are run, allowing outgoing headers to be modified.

The optional condition can be either onsuccess or always. It determines, which internal header table should be operated on. onsuccess stands for 2xx status codes and always for all status codes (including 2xx). Especially if you want to unset headers set by certain modules, you should try out, which table is affected.

RequestHeader Directive

This directive can replace, merge or remove HTTP request headers. The header is modified just before the content handler is run, allowing incoming headers to be modified.

Apesar disso, nao tive muito resultado. Cheguei a por assim:

# *********** TROCA DE HEADERS ESTRANHOS PARA GET ************
RequestHeader set PROPFIND GET

Never Ping is offline   Reply With Quote
Eluan
Trooper
 

Steam ID: eluancm
12-04-06, 12:24 #11
Altera o apache logo e faz um NeverApaPingo!

Eluan is offline   Reply With Quote
Aveia-Quaker
Trooper
 

12-04-06, 13:04 #12
A tá, agora eu entendi o que voce quer...

Aveia-Quaker is offline   Reply With Quote
Ted
Trooper
 

Gamertag: MassahudDS PSN ID: massahud Steam ID: massahud
12-04-06, 18:52 #13
Isso é pra acessar um apache passando pelo firewall?

Ted is offline   Reply With Quote
Fura Olho
wat
 

XFIRE ID: EmB_FuraOlho Steam ID: gustavomartino
12-04-06, 19:09 #14
Kahden erillisen seuran synnyn taustalla oli perustajien erilainen näkemys maantieteellisen seuran jäsenistöpohjasta. Palmén näki seuran tiukan tieteellisenä, maantieteilijöiden ja lähitieteiden edustajien muodostaman asiantuntijajoukon kokoontumisfoorumina. Hult puolestaan oli rakenteeltaan monipuolisemman yhteenliittymän kannalla – tieteentekijöiden lisäksi seuran tuli olla myös opettajien ja kaikkien maantieteestä kiinnostuneiden yhteinen kohtauspaikka. Nykyinen SMS syntyi, kun nämä seurat yhdistyivät vuonna 1921.

1900-luvun alun kahdella seuralla oli molemmilla omat julkaisusarjansa. SMS julkaisi tieteellisiä artikkeleita Fennia-sarjassaan, SMY:n julkaisuja puolestaan olivat tieteellisiin artikkeleihin keskittynyt Meddelanden af Geografiska Förening i Finland ja kansantajuisempi, erilaisia maaesittelyjä ja matkakertomuksia sisältänyt Geografiska Föreningens Tidskrift, jonka nimi vuonna 1913 vaihdettiin Terraksi. Jonkin aikaa julkaistiin myös ulkomaisiin aiheisiin keskittyvää Acta Geographicaa. Näistä julkaisuista elämään ovat jääneet suomenkielinen Terra ja nykyisin englanninkielinen Fennia.

Fura Olho is offline   Reply With Quote
punisher
spkr
 

12-04-06, 20:28 #15
W T F M A T E ?

punisher is offline   Reply With Quote
SigSnake
Trooper
 

12-04-06, 20:30 #16
 

SigSnake is offline   Reply With Quote
Never Ping
🌀 Trooper
 

Gamertag: Willian Braga PSN ID: Never_Ping XFIRE ID: neverping Steam ID: neverping
12-04-06, 20:51 #17
Quote:
Postado por Ted
Isso é pra acessar um apache passando pelo firewall?
Isso serve para tratar requests indevidos, evitar que nego use algo trouxa e fique dando erros nos logs.

Never Ping is offline   Reply With Quote
Fura Olho
wat
 

XFIRE ID: EmB_FuraOlho Steam ID: gustavomartino
12-04-06, 23:59 #18
Quote:
Postado por SigSnake
 
EANEAHPIOAEUIAEUIOEAIOAIEOJOEAPOIeajoioih rdtoh joroi hrtjoi htrtsrh ih r

Fura Olho is offline   Reply With Quote
Responder


Regras de postagem
Você não pode criar novos tópicos
Você não pode postar
Você não pode enviar anexos
Você não pode editar seus posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Atalho para Fóruns



O formato de hora é GMT -3. horário: 07:56.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.